ISO 3166 Alpha-2 Country Code Lookup

Find 2-letter country codes used in URLs, domains, and APIs

Look up the ISO 3166-1 alpha-2 two-letter country code for any nation, the same codes used in country domains, locale tags, and APIs. Search by code or country name and see the matching alpha-3 and numeric codes too. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is an ISO 3166-1 alpha-2 code?

It is the two-letter country code defined by the ISO 3166 standard, such as GB for the United Kingdom or US for the United States. It is the most widely used country code, appearing in country domains, language tags, and countless APIs.

The ISO 3166-1 alpha-2 standard gives every country a two-letter code, and those codes turn up everywhere: in country-code top-level domains, in locale tags like en-GB, and as the country field in countless APIs and databases. This tool finds the alpha-2 code for any country and shows its matching alpha-3 and numeric codes.

How it works

ISO 3166-1 maintains three parallel codes for each country: a two-letter alpha-2 code, a three-letter alpha-3 code, and a three-digit numeric code. The alpha-2 code is the most common because it is short and was adopted as the basis for country-code top-level domains. The tool matches your text against both the alpha-2 code and the country name, so you can search either way.

Where alpha-2 codes appear in practice

Two-letter country codes are used across a wide range of technical contexts:

  • ccTLDs (country-code top-level domains): .fr for France, .de for Germany, .au for Australia — directly from ISO 3166-1 alpha-2.
  • HTML lang attributes: lang="en-GB" and lang="fr-CA" use the BCP 47 format, where the region subtag after the hyphen is the alpha-2 code.
  • Stripe and payment APIs: the country field in billing address objects expects an ISO 3166-1 alpha-2 code (GB, US, DE, not the country name or phone prefix).
  • Shipping and logistics: carrier APIs and customs forms use alpha-2 for origin and destination country.
  • Google Analytics and BigQuery: country dimension values are alpha-2 codes.

Notable quirks and exceptions

A handful of codes catch developers by surprise:

CountryOfficial alpha-2Common confusion
United KingdomGBDomain is .uk, but ISO code is GB
GreeceGRNot GK or GL
South KoreaKRNot SK (Slovakia)
Czech Republic / CzechiaCZRenamed country, same code
North MacedoniaMKWas FYROM, code unchanged
Timor-LesteTLWas East Timor, same code

The UK quirk is the most frequently encountered: GB is the official ISO code and must be used in APIs and databases, but the internet domain .uk diverges for historical reasons.

Alpha-2 versus alpha-3 versus numeric

All three identify the same country. Choose based on your system’s requirement:

  • Alpha-2 (2 letters): most compact, most common — HTML, APIs, most payment systems
  • Alpha-3 (3 letters): more readable, less ambiguous (GBR vs GB) — passports, UN documents
  • Numeric (3 digits): language-independent, used in payment standards and statistical systems

The result line shows all three, so this tool also doubles as a quick cross-reference between the three ISO 3166-1 code types.

Tips and example

To find a country’s code, type its name — searching Georgia returns GE. To go the other way, type the code you have, such as JP, to confirm it is Japan. The result line also shows the alpha-3 and numeric forms, so you can convert between the three representations in one step. Nothing you type is transmitted — the lookup runs entirely in your browser.