Salesforce ID converter, 15 to 18 characters

Paste Salesforce record IDs to convert them between 15 and 18 characters, one at a time or in bulk. It also checks each ID and puts back the case if another tool changed it.

3 of 3 converted

3

1 with the case put back

15 or 18 characters. It works both ways, and a row pasted from a sheet is fine.

Sample IDs. The last one has lost its capitals, so the tool puts them back.

  • Valid, Account

    18
    001A0000006Vm9rIAC
    15
    001A0000006Vm9r
  • Valid, Contact

    18
    003Dn00000AbCdEIAV
    15
    003Dn00000AbCdE
  • Case put back, Account

    18
    001A0000006Vm9rIAC
    15
    001A0000006Vm9r

    The case didn’t match the last 3 characters, so it’s been put back. Check this record in Salesforce.

Runs in your browser with no sign-up. What you paste stays on this page, and we only record that the tool was used.

How to use the Salesforce ID converter

  1. Paste your IDs, one per line. You can mix 15 and 18 characters.
  2. Read the status of each one: valid, case put back, or not valid.
  3. Copy all the 18-character or 15-character IDs, or download a CSV with both and the object type.

What is the difference between a 15 and 18 character Salesforce ID?

A 15-character ID is case sensitive, so 000000000000Abc and 000000000000aBC are different records. The 18-character version adds three characters that encode the case of the first 15, so case-insensitive tools like spreadsheets can compare IDs safely. All API calls return the 18-character form, and Salesforce recommends using it.

What is the difference between a 15 and 18 character Salesforce ID?
ObjectID starts with
AccountSalesforce Help001
ContactSalesforce Help003
LeadSalesforce Help00Q
OpportunitySalesforce Help006
CaseSalesforce Help500
CampaignSalesforce Help701
UserSalesforce Help005
OrderSalesforce Help801

The first three characters of an ID are its key prefix. Custom objects get their own, so this tool names the common standard objects only.

How does the 15 to 18 character conversion work?

Split the 15 characters into three blocks of five. For each block, build a number where every uppercase letter sets one bit, then turn that number into one character from A to Z or 0 to 5. Those three characters go on the end. It’s the same result CASESAFEID gives.

How do I convert an ID inside Salesforce?

Create a Text formula field with CASESAFEID(Id), which Salesforce recommends for ongoing use. In Apex, the Id class has to15() to go the other way. For a one-off list, or IDs already outside Salesforce, this converter is quicker than a new field.

How do I convert an 18 character ID to 15?

Remove the last three characters. Salesforce says you can truncate them, though it recommends keeping the 18-character ID. Check the case first. If a tool lowercased the ID, the first 15 characters are wrong until the case is restored. This converter does that before it gives you the 15.

Can you fix a Salesforce ID that lost its capitals?

An 18-character ID, yes. The last three characters record which letters were uppercase, so the case can be rebuilt, the way Apex’s Id.valueOf does with restoreCasing. A 15-character ID, no. Once its case is gone, nothing in the ID says what it was. Go back to the source.

Why do my Salesforce IDs not match in Excel?

Lookups in Excel ignore case, so two different 15-character IDs can look like a match. Convert both sides to 18 characters first and compare those, because the last three characters keep each ID unique when case is ignored. The same applies to joins in a warehouse that ignores case.

Does a valid result mean the record exists?

No. This tool checks the format and the case, and it can’t see your org. An ID can pass with a wrong digit, because digits don’t affect the last three characters. To confirm a record, look it up in Salesforce. Don’t change the case of an 18-character ID by hand either, because Salesforce returns an error.

If broken joins keep showing up, it’s usually how the data moves. Our Salesforce consulting sorts that out at a fixed price.

Add this tool to your site

Paste this where you want it. It stays free and sends no tracking from your site.

HTML
<iframe src="https://www.martechdevs.com/embed/salesforce-id-converter" title="Salesforce ID converter" width="100%" height="820" style="border:0;max-width:760px" loading="lazy"></iframe>
<p style="font-size:13px">Free tool by <a href="https://www.martechdevs.com/tools/salesforce-id-converter">martechdevs</a></p>

Sources

Last updated

Guides on Salesforce data

Read all guides

Want it set up for you? See implementation plans or book a free call.