The ISO 3166-1 numeric standard assigns each country a three-digit code, such as
826 for the United Kingdom. Because they are digits only, these codes are
independent of any alphabet, which makes them ideal for payment, shipping, and
statistical systems that span many languages. This tool translates a numeric code
to a country and back.
How it works
The numeric codes are drawn from the United Nations M49 standard, so they line up
with UN statistical data. They are always three digits and are zero-padded:
Afghanistan is 004, not 4. The tool handles this for you — typing 4 still
finds Afghanistan by also matching the padded form 004. Because the codes carry
no spelling, they stay stable even when a country renames itself, an advantage
over the letter codes.
A practical note for developers: store these codes as strings, not integers, or you will lose the leading zeros that the standard requires.
Where numeric country codes appear
Numeric codes are used in contexts where a purely digit-based identifier is safer or more compact than a letter code:
- EMV payment cards and ISO 8583: transaction messages carry the issuing country as a numeric code.
- Customs and trade documents: shipping declarations (Intrastat, EU customs SAD forms) use numeric codes for origin and destination countries.
- UN statistical databases: data from the World Bank, OECD, and UN trade databases consistently use M49 numeric codes as the country dimension key.
- Biometric passports (ICAO Doc 9303): the machine-readable zone of some documents encodes country as a 3-digit numeric reference.
- Legacy database schemas: older government and financial systems often stored numeric codes where string comparisons were expensive.
Selected numeric codes for reference
| Numeric | Alpha-2 | Country |
|---|---|---|
| 004 | AF | Afghanistan |
| 036 | AU | Australia |
| 076 | BR | Brazil |
| 156 | CN | China |
| 276 | DE | Germany |
| 356 | IN | India |
| 392 | JP | Japan |
| 840 | US | United States |
| 826 | GB | United Kingdom |
| 250 | FR | France |
Note that the codes are not sequential by geography or population — they follow the UN M49 assignment, which allocated codes largely in alphabetical order by the name in use at the time.
Why numeric codes are stable when names are not
When a country renames itself — Czechoslovakia splitting into the Czech Republic and Slovakia, Burma becoming Myanmar, or North Macedonia dropping the FYROM designation — the alpha-2 and alpha-3 letter codes may change. The numeric code assigned to the successor state, however, remains the same in most cases, because it is not tied to the spelling of the name. This stability is why financial and statistical systems that need to join datasets across decades prefer numeric codes.
Tips and example
To decode a number, type it — 840 resolves to the United States. To find a
country’s number, type its name, such as Brazil, which returns 076. Each
result also lists the alpha-2 and alpha-3 codes, so you can move between all three
ISO 3166-1 representations in a single lookup. Nothing you enter leaves your device.