ISO 3166 Country Code Converter

Convert between ISO 3166-1 alpha-2, alpha-3, and numeric country codes.

Free ISO 3166-1 country code converter. Enter a country name, alpha-2 code (DE), alpha-3 code (DEU), or numeric code (276) and instantly get all three official representations plus the English short name. Runs entirely in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is the difference between ISO 3166-1 alpha-2 and alpha-3 codes?

Alpha-2 is a two-letter code such as DE for Germany, used in domain names and most APIs. Alpha-3 is a three-letter code such as DEU, which is more mnemonic and used in passports and many international standards. Both identify the same country.

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 typeFormatExampleTypical use
Alpha-22 lettersDEInternet domain extensions (.de), HTML lang attributes, most REST APIs
Alpha-33 lettersDEUPassports, UN documents, some banking systems (SWIFT, IBAN country references)
Numeric3 digits276Systems where Latin letters cannot be guaranteed; financial databases; encoding-neutral storage

Example lookups

  • Entering 276, DE, DEU, or Germany all resolve to the same record: alpha-2 DE, alpha-3 DEU, numeric 276.
  • Entering US, USA, 840, or United States all return the United States entry.
  • Entering GB, GBR, 826, or United Kingdom all return the UK entry — note that the alpha-3 form GBR is what appears on British passports.
  • Entering ARM returns Armenia — alpha-2 AM, numeric 051.

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 MK to MK (unchanged), alpha-3 MKD, numeric 807. 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 lang attributes: lang="de" uses the alpha-2 code.
  • HTTP Accept-Language headers: also alpha-2, sometimes combined with a region subtag like en-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 country field on addresses and cards.
  • Locale strings: typically combine ISO 639 language code with ISO 3166-1 alpha-2, e.g. fr-FR or zh-CN.