The difference between 15 and 18 Digit Record Ids in Salesforce

Sam Hoult
May 27, 2024
Did you know that for each record in Salesforce, there are actually two Id values. Learn the difference between the two, and why you should be using the 18 Digit Record Id for your data loading.

What are Record Ids?

Record Ids are the unique values for each record in Salesforce. Every Contact, Account, and every other object has a unique Id assigned to it automatically by Salesforce. In the background there are actually two Ids which are created, a 15 digit one and an 18 digit one.

What is the difference between 15 and 18 Digit Ids?

15 Digit Ids are case-sensitive Ids, which Salesforce uses internally to maintain their database. Because they are case-sensitive it means that Contact A can have the Id 003000000000abc and Contact B can have the Id 003000000000ABC and these are seen as Unique from a Salesforce perspective.

18 Digit Ids on the other-hand, are not case-sensitive, and are also unique e.g. Contact A could have the Id 003000000000ABCCBA and Contact B could have the Id 003000000000CBAABC.

What Id should I use for loading data into Salesforce?

There are a couple reasons why you should use the 18 Digit Id record when loading data into Salesforce:

How can I get the 18 digit Id for a record in Salesforce?

One way which you can view the 18 digit Id for an individual record is by looking in the URL, when you are viewing the record e.g.

If you want to view the 18 digit Ids in a report, then you will need to create a formula field on each object that you need to view the Id. Salesforce has a build in formula for you to use:

What Id is shown if I export data from a Salesforce Report?

If you export data via a Salesforce Report, the 15-digit Id will be shown and exported to CSV. Unless you have created a Case Safe ID and included that field in your report. the standard Id field will be in the 15-digit format. This means that you need to be careful when exporting data via a report, which you then use to import from. If you export records using dataimporter.io then you will automatically have the 18 digit Id, no need to create a custom field on each object, and any imports will work seamlessly.

Summary

While Salesforce Data Loader and other tools such as dataimporter, can recognize the 15 Digit Id, it is always better to use the 18 Digit Id. It will make sure that any data manipulation you need to do in Excel will work as expected, and that your data import is clean and accurate.

Get Started with Dataimporter