Convert any ISO 3166-1 country code instantly
The ISO 3166 Country Code Converter turns any single representation of a country into all of its standard forms. Type a country name, a two-letter alpha-2 code, a three-letter alpha-3 code, or the three-digit numeric code, and the tool returns the full set: alpha-2, alpha-3, numeric, and the official English short name. Everything runs locally in your browser — no data leaves your machine.
How it works
ISO 3166-1 assigns every country and dependent territory three parallel codes. The converter holds the official mapping table and matches your input by shape:
- A purely numeric input is zero-padded to three digits and matched against the numeric column.
- A two-character input is matched against alpha-2 (for example
DE). - A three-character input is matched against alpha-3 (for example
DEU). - Anything else is treated as a country name, with an exact match preferred over a partial contains match.
Because the three codes are different views of the same record, once any one matches, all the others are read directly from the same row.
The three code types and when to use each
| Code type | Format | Example | Typical use |
|---|---|---|---|
| Alpha-2 | 2 letters | DE | Internet domain extensions (.de), HTML lang attributes, most REST APIs |
| Alpha-3 | 3 letters | DEU | Passports, UN documents, some banking systems (SWIFT, IBAN country references) |
| Numeric | 3 digits | 276 | Systems where Latin letters cannot be guaranteed; financial databases; encoding-neutral storage |
Example lookups
- Entering
276,DE,DEU, orGermanyall resolve to the same record: alpha-2DE, alpha-3DEU, numeric276. - Entering
US,USA,840, orUnited Statesall return the United States entry. - Entering
GB,GBR,826, orUnited Kingdomall return the UK entry — note that the alpha-3 formGBRis what appears on British passports. - Entering
ARMreturns Armenia — alpha-2AM, numeric051.
The numeric form is especially useful in systems that cannot rely on Latin letters, since it is language-neutral and remains stable even when a country’s alphabetic codes change due to a rename.
Notable recent changes
ISO 3166 is maintained by the ISO 3166 Maintenance Agency and is updated when countries rename themselves or when international recognition changes. Two recent examples worth knowing:
- Türkiye — formerly listed as Turkey; the alpha-2 (
TR) and numeric (792) codes did not change, only the official English short name. - North Macedonia — changed from the Former Yugoslav Republic of Macedonia; the alpha-2 changed from
MKtoMK(unchanged), alpha-3MKD, numeric807. The English short name moved to North Macedonia.
This tool reflects current assignments. For legally binding documents — contracts, compliance filings, shipping paperwork — confirm against the official ISO Online Browsing Platform at the time of use, as the standard is updated without a fixed schedule.
Common uses in software development
- HTML
langattributes:lang="de"uses the alpha-2 code. - HTTP
Accept-Languageheaders: also alpha-2, sometimes combined with a region subtag likeen-GB. - REST API country fields: most modern APIs use alpha-2 for brevity; some older or financial APIs use alpha-3 or numeric.
- Stripe and payment processors: use alpha-2 for the
countryfield on addresses and cards. - Locale strings: typically combine ISO 639 language code with ISO 3166-1 alpha-2, e.g.
fr-FRorzh-CN.