Free Tool

Salesforce ID Converter: 15 to 18 Characters

Paste one ID, a list or a whole CSV file. Get the 18-character IDs, see which object each belongs to and catch IDs that only differ in capitals. Free, runs in your browser, nothing uploaded.

Your Salesforce IDs

The converter needs JavaScript. How the three extra characters are built is explained below.

How It Works

Where the Three Extra Characters Come From

A 15-character ID is case-sensitive: to Salesforce, 001xx000003DHur and 001XX000003DHUR are different records. The three extra characters record where the capitals are, so the 18-character ID survives tools that ignore case.

Salesforce calls it case-safe. It is not case-insensitive: change the case of an 18-character ID by hand and the suffix no longer matches. That is also how this converter restores the capitals Excel removed.

The suffix in four steps

  • Split the 15 characters into three blocks of five
  • Add 1, 2, 4, 8, 16 for a capital letter in position 1 to 5
  • Look up each sum (0 to 31) in A to Z, then 0 to 5
  • Append the three characters: 001xx000003DHur + AAG

Try a Real Case

Each loads its IDs into the converter. The first two come from Salesforce’s own documentation.

Excel and Google Sheets

The Lookup Trap With 15-Character IDs

Excel’s MATCH, and with it VLOOKUP and XLOOKUP, ignores case. Two 15-character IDs that differ only in capitals look like one record, and the lookup returns whichever comes first.

Convert to 18 characters before you look anything up. If you have to keep 15-character IDs, EXACT compares case-sensitively.

  • Reports return 15-character IDs; the API and Data Loader return 18
  • Salesforce accepts both when you import or update
  • A CASESAFEID formula field puts the 18-character ID in every report

Formulas to copy

=XLOOKUP(TRUE, EXACT($A$2:$A$5000, D2), $B$2:$B$5000)

/* Salesforce: a formula field (Text) that shows the 18-character ID */
CASESAFEID(Id)

Get 18-Character IDs Into Your Data

Four steps, so every list you match carries IDs that survive Excel.

  1. 1

    Export With 18 Characters

    Data Loader and the weekly data export already give 18-character IDs. Reports give 15.

  2. 2

    Add a CASESAFEID Field

    A text formula field with CASESAFEID(Id) shows the 18-character ID in reports and list views.

  3. 3

    Convert One-Off Lists Here

    Paste a column or open the CSV: you get the same file back with an 18-character column next to each ID column.

  4. 4

    Import by ID

    In Account Engagement (Pardot), match prospects by CRM ID instead of email where you can; Salesforce recommends it to link prospects to the right lead or contact.

IDs in Imports and Matching

Where 15 and 18 characters matter in Pardot and Data 360 (formerly Data Cloud).

  • 15Characters: case-sensitive, what reports show
  • 18Characters: case-safe, what the API returns
  • 3Characters: the key prefix that names the object
  • Pardot import. Matches prospects by email or by CRM ID, the Salesforce lead or contact ID. Salesforce recommends the CRM ID where you have it, so new prospects link to the right record.
  • Data 360 match rules. Exact matching ignores case: Maryanne and MARYANNE match. For 15-character CRM IDs, Salesforce says to select Case Sensitive, or match on the 18-character ID.
  • Reports and exports. Reports give 15 characters, Data Loader and the weekly export 18. Mixing the two in one list is where duplicates start.
  • Key prefix. The first three characters name the object: 00Q a lead, 003 a contact, 001 an account. Custom objects start at a00.

Salesforce ID Converter FAQ

Short answers to what people ask about 15- and 18-character Salesforce IDs.

How do I convert a 15-character Salesforce ID to 18 characters?

Paste it into the converter above. In Salesforce itself, a formula field with CASESAFEID(Id) shows the 18-character version. The three added characters encode which of the 15 characters are capitals.

How do I convert an 18-character ID back to 15?

Remove the last three characters. Salesforce recommends keeping the 18-character ID, because only that one survives tools that ignore case.

Is the 18-character ID case-insensitive?

Salesforce calls it case-safe, not case-insensitive: if the case of an 18-character ID is changed by hand, the suffix no longer matches. The suffix records the original capitals, which is how they can be restored.

Why do my VLOOKUPs return the wrong record?

Excel’s lookups ignore case, so 15-character IDs that differ only in capitals look identical. Convert the IDs to 18 characters first, or compare with EXACT.

Which object does an ID belong to?

The first three characters, the key prefix, name the object: 001 Account, 003 Contact, 00Q Lead, 006 Opportunity, 701 Campaign, 005 User, 500 Case. Custom objects use prefixes from a00 on.

Are my IDs uploaded?

No. The converter and the CSV file reading run in your browser; nothing is sent or stored. Nothing you enter is sent to us or to analytics.

We Make Salesforce Marketing Work for You

Talk to a certified consultant, not a salesperson, and leave the first call knowing your next step.