MEID and ESN Converter
Convert an MEID between its 14-digit hexadecimal and 18-digit decimal forms, compute its check digits and pseudo-ESN, get the IMEI of a numeric MEID, and convert ESNs between hex and decimal.
By David Santacruz · Updated
Convert one value
- 14 hex digits: MEID
- 15 hex digits: MEID and check digit (15 digits 0–9: an IMEI)
- 18 digits: MEID in decimal form, 19 with its check digit
- 8 hex digits: ESN or pESN
- 11 digits: ESN or pESN in decimal form
- Case, spaces, dots, hyphens and a 0x prefix are ignored.
Try an example
Convert a list (up to 500 lines)
Rows that repeat an MEID in another form, or whose pESN matches an earlier row, are flagged.
Conversion, including the SHA-1 hash for the pESN, runs in your browser. Nothing you type is sent to the server.
What MEID, ESN and pESN are
The ESN (electronic serial number) is the 32-bit identifier that analog and CDMA phones carried. Its successor, the 56-bit MEID (mobile equipment identifier), is defined by 3GPP2 in report S.R0048. ESNs ran out: TIA, the ESN administrator, accepted the last requests for ESN manufacturer codes on 30 June 2010 and has assigned only MEIDs since.
| Digits | Field | Bits | Hexadecimal MEID | Numeric MEID |
|---|---|---|---|---|
| 1–2 | RR (regional code) | 8 | A0–FF | 99 (98 and 97 also in TIA's range) |
| 3–8 | Manufacturer code | 24 | 000000–FFFFFF | 000000–999999 |
| 9–14 | Serial number | 24 | 000000–FFFFFF | 000000–999999 |
| 15 | Check digit (CD) | — | 0–F, Luhn in base 16 | 0–9, Luhn in base 10 |
TIA, the global hexadecimal administrator, assigns the RR and manufacturer code; the manufacturer assigns the serial numbers. When 3GPP2 X.S0008 converts an MEID to decimal, it treats the first eight digits (RR plus manufacturer code, 32 bits) as the manufacturer code and the last six as the serial number. The check digit is not part of the MEID and is never transmitted. It is meant for printing the MEID on a label or the box.
An ESN is written as 8 hex digits or 11 decimal digits: the first 8 bits become 3 decimal digits (000–255) and the other 24 bits become 8 (00000000–16777215). Systems built around the 32-bit ESN still need one from an MEID phone, so the phone also stores a pseudo-ESN (pESN): the manufacturer code 0x80 followed by the 24 least significant bits of the SHA-1 hash of the MEID, as 3GPP2 C.S0072 specifies. Every pESN therefore starts with 80 in hex and 128 in decimal.
How the conversions work
The converter identifies the input by its length (rules under the input field) and computes every other form. Take AF0123450ABCDE, the example MEID in X.S0008 Annexes A and B:
- Decimal form. Split after the eighth digit.
AF012345is 2,936,087,365, written with 10 digits;0ABCDEis 703,710, padded to 8 digits as 00703710. Together they give293608736500703710, printed in 5-5-4-4 groups as29360 87365 0070 3710. - Hex check digit. The MEID contains letters, so the Luhn algorithm runs in base 16. Double every other digit, starting with the rightmost: E, C, A, 5, 3, 1 and F become 1C, 18, 14, A, 6, 2 and 1E. Adding the hex digits of those results to the undoubled digits gives 0x64, so the check digit is C, the step up to 0x70.
- Decimal check digit. The 18-digit form gets its own base-10 Luhn digit. Its total is 60, so that check digit is 0.
- pESN. SHA-1 runs over the 7 bytes AF 01 23 45 0A BC DE, not over the 14 characters of text. The digest ends in 16 B1 28, so the pESN is
8016B128, or12801487144in decimal (128, then 01487144).
Going back splits the digits the same way: 10 + 8 digits back to 8 + 6 hex digits for an MEID, and 3 + 8 digits back to 2 + 6 hex digits for an ESN. A pESN cannot be reversed. SHA-1 is one-way, and with 256 possible MEIDs and 224 possible pESNs, each pESN stands for about 4.3 billion MEIDs.
MEID to IMEI, and IMEI to MEID
S.R0048 requires phones that work on both 3GPP2 (CDMA) and 3GPP or GSM networks to use an identifier made only of the digits 0–9, so one number serves both. That numeric MEID is the IMEI without its check digit:
- MEID to IMEI: append the base-10 Luhn check digit from 3GPP TS 23.003.
35209900176148becomes352099001761481. - IMEI to MEID: drop the 15th digit. Apple's support page says the same for the iPhone 5, 5c, 5s, 6, 6 Plus and SE (1st generation): the MEID is the first 14 digits of the IMEI.
TIA assigns numeric MEIDs from RR 99 and asks that only those be labelled MEID. Numeric values outside its range, such as those starting with 35, come from GSMA IMEI ranges and are IMEIs, even when a phone lists the first 14 digits as the MEID.
No IMEI can be computed from a hexadecimal MEID. The two come from separate number ranges, and TIA's MEID FAQ says an IMEI should never be turned into an MEID by converting it from base 10 to base 16: the result is an MEID that nobody assigned, which can later duplicate a real one.
Why a pESN is not a unique key
A pESN keeps only 24 bits of the hash, so there are 16,777,216 possible values. By the birthday problem, a set of 4,823 MEIDs already has a 50% chance that two of them share a pESN. The MEIDs AF012345000507 and AF012345001DF1 both give 8095C7A1.
TIA's MEID FAQ lists what duplicate pESNs break in systems that still rely on the ESN: identical public long code masks on the CDMA air interface, false alarms in fraud checks that pair the MIN (mobile identification number) with the ESN, colliding 911 callback numbers, and trouble in billing systems keyed on the ESN. Key device records on the MEID, store the pESN as a derived attribute, and allow duplicates in that column.
Test cases worth covering
- Case and separators.
af0123450abcde,AF 01 23 45 0A BC DEandAF0123450ABCDEare one MEID. Normalise to upper case without separators before comparing or storing. - Leading zeros in both decimal parts.
A0000000002329has the serial part 00009001, and the numeric MEID35209900176148has the decimal form089132876801532232. An 11-digit ESN starts with 0 whenever its first byte is below 0x64:1A2B3C4Dis02602833485. - Store every form as text. Excel keeps 15 significant digits, so an 18-digit decimal MEID typed as a number has its last three digits replaced by zeros. JavaScript cannot hold it exactly either, because it is above
Number.MAX_SAFE_INTEGER. - The check digit is display-only. Do not store it as part of the MEID. Accept a 15th character on input, verify it in the right base (16 for hex MEIDs, 10 for numeric ones), then drop it.
- Decimal ESN bounds.
25516777215(FFFFFFFF) is the largest valid value. Reject25616777215and25516777216, where one part overflows its 8 or 24 bits. - MEIDs and IMEIs in one column. If a field accepts both 14-digit MEIDs and 15-digit IMEIs, match records on the first 14 digits after verifying the 15th. The list converter flags one device entered in two forms.
- Hash input and collisions. Hashing the text instead of the 7 bytes turns 8016B128 into 8054236E. Test with 3GPP2's own vector (FF000001123456 gives 800737E1), and check that the two MEIDs sharing 8095C7A1 stay two devices.
Sources
- 3GPP2 X.S0008-A v2.0, MAP Support for the Mobile Equipment Identity (MEID), Annexes A and B — 3GPP2. The 18-digit decimal form, the base-16 and base-10 check digits, and the AF0123450ABCDE example
- 3GPP2 C.S0072-0 v1.0, MEID Support for cdma2000 Spread Spectrum Systems, section 2.1.1.1 — 3GPP2. How the pseudo-ESN is derived from the MEID with SHA-1, with the FF000001123456 example
- 3GPP2 S.R0048-A v4.0, 3G Mobile Equipment Identifier (MEID), Stage 1 — 3GPP2. The 56-bit MEID structure, its field ranges and the all-decimal rule for multi-mode terminals
- MEID Products and Services — TIA. Hexadecimal and decimal "99" MEID ranges, and TIA as the Global Hexadecimal Administrator
- MEID FAQ (April 21, 2026) — TIA. pESN collisions, the end of ESN assignments, MEID labelling, and why an IMEI must not be converted to a hexadecimal MEID
- 3GPP2 SC.R4002-0 v14.0, GHA Assignment Guidelines and Procedures for MEID and SF_EUIMID — 3GPP2 / TIA. Decimal MEID ranges and the size of the ESN numbering space
- ETSI TS 123 003 V16.11.1 (3GPP TS 23.003), Annex B — ETSI / 3GPP. The base-10 Luhn check digit of the IMEI
- Find the serial number, EID, or IMEI on your iPhone, iPad, or iPod touch — Apple Support. Where iPhones show the IMEI/MEID, and that on the iPhone 5, 5c, 5s, 6, 6 Plus and SE (1st generation) the MEID is the first 14 digits of the IMEI
- Excel specifications and limits — Microsoft Support. Number precision of 15 digits
- Number.MAX_SAFE_INTEGER — MDN Web Docs. The largest integer JavaScript represents exactly
Frequently asked questions
How do I convert an MEID from hex to decimal?
Split the 14 hex digits after the eighth. Convert the first eight to decimal and pad them to 10 digits, convert the last six and pad them to 8 digits, then join the two parts. AF0123450ABCDE becomes 29360 87365 0070 3710.
How do I get the IMEI from an MEID?
Only an MEID made of the digits 0–9 converts to an IMEI: append its base-10 Luhn check digit, so 35209900176148 becomes 352099001761481. No IMEI can be computed from a hexadecimal MEID, and converting an IMEI from base 10 to base 16 does not produce a valid MEID.
What is a pseudo-ESN (pESN)?
A 32-bit stand-in for an ESN that an MEID phone uses with systems built for ESNs. It is 0x80 followed by the last 24 bits of the SHA-1 hash of the 7-byte MEID, so it starts with 80 in hex and 128 in decimal.
Can I get the MEID back from a pESN?
No. SHA-1 cannot be reversed and only 24 of its bits are kept, so about 4.3 billion MEIDs map to each pESN. Keep the full MEID wherever a record has to identify one device.
Is the check digit part of the MEID?
No. 3GPP2 X.S0008 defines it for printing the MEID on a label or the packaging, and it is not transmitted. Store the 14-digit MEID and compute the check digit when you display it.
Why is a decimal MEID 18 digits long and a decimal ESN 11?
An MEID has 56 bits: the first 32 become 10 decimal digits and the last 24 become 8. An ESN has 32 bits: the first 8 become 3 decimal digits and the last 24 become 8.
Mobile Test Data Tools
Generate, convert and check the identifiers that phones, SIM cards and eSIMs carry
Random IMEI Generator
Generate up to 50 Luhn-valid test values with profile labels and CSV export. Labels do not verify a device model.
IMEI Calculator
Calculate the last digit of a 14-digit body, or check a 15-digit IMEI with the Luhn check digit.
Random Phone Number Generator
Fictional US, Canadian, UK and Australian numbers from ranges regulators keep out of service for TV and film.
ICCID Generator & Checker
Create SIM card numbers with a valid Luhn digit, or check and complete an ICCID you already have.
IMSI Generator
Build subscriber identities under MCC 999, the ITU code for private networks, or your own lab PLMN.
IMEISV Converter
Turn an IMEI and a software version number into a 16-digit IMEISV, or recover the IMEI from one.
EID Generator & Checker
Validate a 32-digit eSIM EID with its mod 97 check digits, or generate test EIDs from a prefix.
IMEI Knowledge Base
Learn about IMEI structure, TAC codes, validation methods, and testing best practices.