1. Go to Setup | Customize | object name | click Fields
a. For Custom objects: Setup | Create | Objects | object name
2. In the related list "Custom Fields & Relationships" click New.
3. Click the Formula radio button.
4. Click the Text radio button for 'Formula Return Type.'
5. Input the following Formula into the Formula Editor:
CASESAFEID(Id)
6. Set Field Visibility, add, or remove from the page layout.
7. Click Save.
Lightning
1. Go to Setup | Object Manager | Object name | Fields & Relationships
2. Click New.
3. Click the Formula radio button and click Next.
4. Click the Text radio button for 'Formula Return Type.'
5. Input the following formula into the Formula Editor:
CASESAFEID(Id)
6. Set Field Visibility, add, or remove from the page layout.
7. Click Save.
Note: When dealing with record types only custom record types have Ids. Please review Set Record Type Preferences for more information.
The other way is to use the following Javascript as a bookmarklet in your browser to manually convert IDs any time.
Note: This may not work in the Edge browser.
javascript:(function(){
var input=prompt('Enter 15-character ID');
var output;
if(input.length == 15){
var addon="";
for(var block=0;block<3; block++)
{
var loop=0;
for(var position=0;position<5;position++){
var current=input.charAt(block*5+position);
if(current>="A" && current<="Z")
loop+=1<<position;
}
addon+="ABCDEFGHIJKLMNOPQRSTUVWXYZ012345".charAt(loop);
}
output=(input+addon);
}
else{
alert("Error : "+input+" isn't 15 characters ("+input.length+")");
return;
}
prompt('18-character ID:',output);
})();
How-to Video: How to Convert a 15-Character Id to an 18-Character Id
API versions after 2.5 use the 18-character format exclusively. Reports query the database directly and return a 15-character ID. Tools like Data Loader or Weekly Data Export service will export records with the 18-character ID.
000385066

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.