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):
.frfor France,.defor Germany,.aufor Australia — directly from ISO 3166-1 alpha-2. - HTML lang attributes:
lang="en-GB"andlang="fr-CA"use the BCP 47 format, where the region subtag after the hyphen is the alpha-2 code. - Stripe and payment APIs: the
countryfield 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:
| Country | Official alpha-2 | Common confusion |
|---|---|---|
| United Kingdom | GB | Domain is .uk, but ISO code is GB |
| Greece | GR | Not GK or GL |
| South Korea | KR | Not SK (Slovakia) |
| Czech Republic / Czechia | CZ | Renamed country, same code |
| North Macedonia | MK | Was FYROM, code unchanged |
| Timor-Leste | TL | Was 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.