Salesforce 15 to 18 Character ID Converter

Converted IDs

 

Photo of calculator author Wes NolteCreated by Wes Nolte.Last updated Jan 16, 2025.

What are Salesforce IDs?

Salesforce IDs are unique identifiers used to reference any record in Salesforce. They come in two formats: 15-character case-sensitive and 18-character case-insensitive. The 18-character version is particularly useful for systems that don't maintain case sensitivity.

This converter helps you transform IDs between these formats, which is particularly useful when working with different systems or APIs that may require one format or the other.

Understanding Salesforce ID Formats

The original Salesforce ID format consisting of 15 case-sensitive characters. This is what you typically see when viewing records in Salesforce's user interface. An extended version that adds 3 suffix characters to make the ID case-insensitive. This format is often required for external integrations or systems that don't preserve case sensitivity.

Why are there 2 formats for the same ID?

Imagine writing down the word "Cat" - if you're careful about capitalization, "Cat" is different from "cat" or "CAT". That's what we call case-sensitive. The 15-character Salesforce ID works the same way - capitalization matters.

But some computer systems don't care about capitalization - they treat "Cat", "cat", and "CAT" as the same word. When these systems handle Salesforce IDs, they might confuse different records because they ignore the uppercase and lowercase differences.

For example, these two 15-character IDs might look different to Salesforce:
Record 1: 00AA000000xxxxx
Record 2: 00aa000000xxxxx

But a case-insensitive system would see them as the same ID! To solve this problem, Salesforce created the 18-character format. The extra 3 characters at the end act like a special code that helps systems tell these IDs apart, even if they don't care about capitalization.

How ID Conversion Works

15 to 18 Character Conversion

To make a 15-character ID case-insensitive, we add a 3-character suffix. Each character in this suffix is calculated by examining the uppercase/lowercase pattern in the original ID. Let's see how this works with an example:

Take this 15-character ID: 001B000000RxPeF

First, we split it into three 5-character chunks:

  • Chunk 1: 001B0
  • Chunk 2: 00000
  • Chunk 3: RxPeF

For each chunk, we analyze uppercase letters in each position and add up values based on their position:

  • Position 1 uppercase = 1
  • Position 2 uppercase = 2
  • Position 3 uppercase = 4
  • Position 4 uppercase = 8
  • Position 5 uppercase = 16

Let's calculate the value for each chunk:

  • Chunk 1 (001B0):
    • Only B in position 4 is uppercase
    • Position 4 = 8
    • Total = 8
    • Looking up 8 in our sequence "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345", we get 'I'
  • Chunk 2 (00000):
    • No uppercase letters
    • Total = 0
    • Looking up 0 in our sequence gets us 'A'
  • Chunk 3 (RxPeF):
    • R in position 1 = 1
    • P in position 3 = 4
    • F in position 5 = 16
    • Total = 1 + 4 + 16 = 21
    • Looking up 21 in our sequence gets us 'V'

The final 18-character ID is the original ID plus these three characters: 001B000000RxPeFIAV

18 to 15 Character Conversion

Converting back to 15 characters is straightforward - just remove the last three characters. For example:

  • 18-character: 001B000000RxPeFIAV
  • 15-character: 001B000000RxPeF

The removed characters (IAV) can always be recalculated if needed using the 15-character ID, making this a safe operation.

More Examples:

  • 15-char: 00DB000000rT9jK → 18-char: 00DB000000rT9jKMAS
  • 15-char: 005B0000001HhQM → 18-char: 005B0000001HhQMIA0
  • 15-char: 003B0000005KnVT → 18-char: 003B0000005KnVTIA0

When to Use Each Format

Use 15-character IDs ehen:

  • Working directly in Salesforce UI
  • Using case-sensitive systems
  • Referencing records in URLs
  • Working with older Salesforce tools

Use 18-character IDs when:

  • Building external integrations
  • Working with case-insensitive systems
  • Handling data exports/imports
  • Using modern API interfaces

References