In our Salesforce CRM, we wanted to integrate a new marketing automation platform with Salesforce to improve marketing campaigns and lead management. The integration requires a Salesforce Org ID to establish a secure connection between the two systems.
In this tutorial, I will explain the difference between 15-digit and 18-digit org IDs and how to find Salesforce Org ID in your console.
Salesforce Org ID
Salesforce Org ID stands for Organization ID of the Salesforce environment, a unique identification assigned to each Salesforce organization. This ID identifies your Salesforce environment from others and is used for many administrative and integration purposes.
It is an alphanumeric string of 15 case-sensitive version characters that helps to differentiate a Salesforce instance from another.
18-character Org ID in Salesforce
The 18-character Salesforce Organization ID is an extended case-insensitive version of the standard 15-character Organization ID. In the 18-character org ID, three extra characters called “case-safe ID characters” are added to the end of the standard 15-character ID.
It is used to refer through the APIs; when you work with API tools, it takes 15 character IDs as input but always returns an 18-character ID when you export.
Difference between 15-character and 18-character org id in Salesforce
The following are the differences between 15-character and 18-character Org IDs in Salesforce.
| 15 Character Org ID | 18 Character Org ID |
|---|---|
| The length of the 15-character Org ID is 15 characters. | The length of the 18-character Org ID is 18 characters. |
| The 15-character Org ID is Case-Sensitive. | The 18-character Org ID is Case-Insensitive. |
| The 15-character Org ID is utilized for general identification and integration. | Salesforce Org ID is the combination of Original ID + Case-Safe Characters. |
| Salesforce Org ID is a sequence of numbers and letters, and it is the original ID. | Salesforce Org ID is a combination of Original ID + Case-Safe Characters. |
| Example: 00D8V00001lu9y | Example: 00DB8V00001lu9y + UAA |
Find Org ID in Salesforce
Using the following steps, you can find your Salesforce Org ID.
1. On the Setup page, in the Quick Find Box, search for Company Information. Click on it.
Here, you can see the Salesforce.com Organization ID. This ID is used for integration and to establish a secure connection between the two systems.

With this, we have learned how to find the Salesforce org ID in Salesforce.
Get 18 Digit Org ID in Salesforce
You may have noticed that the org ID in Salesforce, when obtained using the interface, is a 15-character case-sensitive ID.
But if you want to find the 18-digit Org ID in Salesforce, you will get it through the developer console. Let’s see the steps to find an 18-digit org ID in Salesforce.
Option 1: Get Org ID Using Developer Console
Here are the steps for using them. We can find the Salesforce Org ID.
1. Click on the Gare icon and then click the Developer Console option.

2. Developer Console -> Debug -> Open Execute Anonymous Window.

3. Now, type the code below to get the Salesforce org ID, and then again click on the Debug and select Execute Last option.
system.debug(UserInfo.getOrganizationId());
Option 2: Get Org ID Using Query Editor
Start Developer Console -> Query Editor. Now type the below query to get the salesforce org ID in salesforce.
SELECT Id, Name FROM ORGANIZATIONPlease note: Do not put the semicolon (;) at the end of the script; otherwise, the script will throw the following error – Unknown error parsing query.

This is how we can find Salesforce Org ID using the developer console and query editor.
Conclusion
I hope you have learned how to find a Salesforce org ID. Additionally, you have understood the concept of 15-character and 18-character org IDs in Salesforce and how to get an 18-digit org ID in Salesforce. We also learned how to find IDs using the developer console and query editor.
You may also like to read.
- How to Setup Currencies in Salesforce
- How to Create a Free Salesforce Developer Org
- How to Deactivate the Salesforce Developer Edition Org
- How to Add User to Group or Permission Set Using Salesforce Apex
- How to Set up Business Hours, Time Zone, and Language in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.