IMSI Generator
Generate unique test IMSIs under MCC 999, which ITU-T E.212 allocates for internal use in private networks, or under your own lab PLMN. Paste an IMSI to split it into MCC, MNC and MSIN.
By David Santacruz · Updated
Generate IMSIs
A prefix such as 0042 marks a test batch; the remaining MSIN digits are random and unique within the batch. MSINs shorter than the maximum are legal, and the tool allows down to 5 digits.
Split and check an IMSI
The digits do not show where the MNC ends, so choose the length your network uses. The result also shows the other reading.
Try an example
Generation and splitting run in your browser. Nothing you type is sent to the server.
What an IMSI identifies
The International Mobile Subscription Identity (IMSI) identifies a subscription: what a network registers, authenticates and bills. ITU-T E.212 defines it as a string of decimal digits, at most 15 long, made of three fields. 3GPP TS 23.003 uses the same structure and adds that the length of the MNC depends on the MCC.
| Field | Digits | Assigned by | Example |
|---|---|---|---|
| Mobile country code (MCC) | 3 | The ITU. MCC 999 is allocated for internal use in private networks. | 999 |
| Mobile network code (MNC) | 2 or 3 | The national numbering plan administrator; the ITU for 90x MCCs; nobody under MCC 999 | 99 |
| Mobile subscription identification number (MSIN) | Up to 10, within 15 in total | The operator that holds the MNC | 0042731905 |
The IMSI is stored on the SIM, which makes it easy to confuse with the card's own number. The ICCID identifies the SIM card or eSIM profile (ICCID generator), the IMEI identifies the phone (IMEI calculator), and the phone number (MSISDN) is what callers dial. E.212 says the IMSI should not be directly related to the subscription's phone number and is not meant for dialling. Each subscription should get one IMSI, but one card can carry several subscriptions, so one ICCID can map to more than one IMSI.
Why test IMSIs use MCC 999
Appendix III of E.212 allocates MCC 999 for internal use within a private network. MNCs under 999 are not assigned, so two networks may pick the same one. They mean something only inside the network that uses them, are not routable between networks and must not be used for roaming. For testing and examples, the appendix encourages MNC 99 or 999, and both MNC lengths are allowed under 999.
That is why the generator defaults to 999-99 and offers 999-999: IMSIs under them belong to no public network, so they are safe in fixtures, documentation and demos. If your lab core network and test SIMs are provisioned with another PLMN, choose Custom and enter its MCC and MNC. Do not borrow the PLMN of a public operator: a random MSIN under a live PLMN can be a real subscriber's IMSI.
How the generator builds an IMSI
The generator joins the three fields as text and never does arithmetic on them. With PLMN 999-99, a 10-digit MSIN and the prefix 0042:
- MCC
999and MNC99take 5 digits, which leaves room for an MSIN of up to 10. - The prefix is followed by 6 random digits from the browser's
crypto.getRandomValues, for example731905, giving the MSIN0042731905. - MCC, MNC and MSIN together give the IMSI
999990042731905. 5G service-based APIs write the same subscription asimsi-999990042731905, the SUPI format of 3GPP TS 29.571.
IMSIs in a batch are always unique. A prefix has to leave at least one random digit, and a batch cannot be larger than the number of MSINs left: a 9-digit prefix on a 10-digit MSIN allows 10 IMSIs. Shorter MSINs are legal because E.212 leaves the MSIN length to the operator that holds the MNC. The tool stops at 5 digits, which still leaves 100,000 MSINs per PLMN before any prefix.
The parser runs the other way and needs one fact the digits do not carry: the MNC length. Read with a 2-digit MNC, 999990042731905 is PLMN 999-99 with MSIN 0042731905. Read with a 3-digit MNC, the same digits are PLMN 999-990 with MSIN 042731905. A USIM keeps the MNC length in a separate file, byte 4 of EFAD, so the phone can extract the MNC. A database of test subscriptions should store the MNC length or the PLMN next to each IMSI for the same reason.
Where you meet IMSIs
- SIM provisioning. A USIM stores the IMSI in EFIMSI, a 9-byte file. If an operator uses an IMSI shorter than 15 digits, the unused half-bytes are set to F (3GPP TS 31.102).
- Roaming. 3GPP TS 23.003 asks that IMSIs be allocated so that a foreign network never has to analyse more than the MCC and MNC to exchange information about a subscriber. Those five or six digits are all that other networks need to read.
- 5G cores. The 5G subscription permanent identifier (SUPI) can be an IMSI. Service-based interfaces carry it as
imsi-followed by the digits, and the SUCI, a privacy-preserving identifier, carries it in concealed form. - Logs, tickets and screenshots. An IMSI identifies one subscriber's subscription, and 3GPP networks hand out temporary identities such as the TMSI to keep it confidential. Keep real IMSIs out of bug reports: reproduce with 999 values from this page and mask the MSIN in logs.
Test cases worth covering
- Text, not numbers. Keep the IMSI, MCC, MNC and MSIN as strings end to end. An IMSI whose MCC starts with 0 loses that zero in a numeric column, and every field boundary after it shifts. The CSV from this page quotes every cell.
- 01 is not 001. MNC 01 and MNC 001 are different codes, and both are legal under MCC 999. Check that a PLMN field keeps the length that was entered and that
999-01and999-001never collide. - No hard-coded MNC length. Feed a 999-999 IMSI to anything that derives the PLMN from the IMSI. Code that assumes 2 digits reads
999999042731905as PLMN 999-99 with MSIN9042731905. - Length limits. 15 digits is the maximum, so 16 must fail. Shorter IMSIs are legal: if your system accepts only 15 digits, make that a documented rule and test 14 and 10 digits against it.
- Uniqueness. Import a batch, then import one of its IMSIs again. The second import should be refused or update the existing subscription, never create a second one.
- SUPI strings. If you handle 5G data, convert
imsi-999990042731905to999990042731905and back, and rejectimsi-with no digits. TS 29.571 allows 5 to 15 digits after the prefix.
Sources
- ITU-T E.212 (06/2024), clauses 3, 5 and 6.2.4 and Appendix III — ITU-T. IMSI fields and lengths, MCC 999 for private networks, MNC 99 or 999 for tests
- ETSI TS 123 003 V16.11.1 (3GPP TS 23.003), clauses 2.1 to 2.3 — ETSI / 3GPP. Composition of the IMSI, MNC length, SUPI and SUCI, allocation principles
- ETSI TS 129 571 V19.8.0 (3GPP TS 29.571), clause 5.3.2 — ETSI / 3GPP. The Supi data type and its imsi- string form
- ETSI TS 131 102 V19.6.0 (3GPP TS 31.102), clauses 4.2.2 and 4.2.18 — ETSI / 3GPP. EF_IMSI on the USIM, and the MNC length kept in EF_AD
Frequently asked questions
Which MCC and MNC should I use for test IMSIs?
Use MCC 999 with MNC 99 or 999. ITU-T E.212 allocates MCC 999 for internal use within private networks and encourages those two MNCs for testing and examples. If your lab network is provisioned with its own PLMN, use that instead.
How many digits does an IMSI have?
At most 15: a 3-digit MCC, a 2- or 3-digit MNC and an MSIN of up to 10 digits. E.212 lets the operator that holds the MNC choose the MSIN length, so IMSIs shorter than 15 digits are legal.
Can I tell the MNC length from the IMSI alone?
No. Nothing in the digits marks where the MNC ends: 3GPP TS 23.003 makes the MNC length depend on the MCC, and MCC 999 allows both lengths. A USIM stores the MNC length in a separate file (EF_AD), and your data should carry it too, or the PLMN.
What is the difference between an IMSI, an ICCID and an IMEI?
The IMSI identifies the subscription, the ICCID identifies the SIM card or eSIM profile, and the IMEI identifies the phone. A SIM card keeps its IMSI when it moves to another phone, and one card can carry more than one subscription.
What does imsi- mean in 5G logs and APIs?
It marks a SUPI of type IMSI. 3GPP TS 29.571 writes it as imsi- followed by the IMSI digits, for example imsi-999990042731905. The generator adds this form to every row and to the CSV.
Can I put a real IMSI in a bug report?
Avoid it. An IMSI identifies one subscriber's subscription, which is why 3GPP networks use temporary identities to keep it confidential. Reproduce the bug with an IMSI under MCC 999 and mask the MSIN in logs.
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.
IMEISV Converter
Turn an IMEI and a software version number into a 16-digit IMEISV, or recover the IMEI from one.
MEID & ESN Converter
Convert an MEID between hexadecimal and decimal, and compute its check digits and pseudo-ESN.
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.