ISO 3166 Country Code Converter

Turn a country name into its ISO 3166-1 codes, or a code back into the country, one entry or a whole list.

Names or codes

One entry per line, or separated by commas. Two letters are read as alpha-2, three letters as alpha-3, digits as the numeric code, and anything else is matched against the country names. Press Ctrl+Enter to convert.

Codes found

Each entry, the country it names with the ISO official name where one is published, and the three ISO 3166-1 codes.
EntryCountryAlpha-2Alpha-3Numeric

ISO 3166-1 gives every country and dependent territory three codes: a two-letter alpha-2, the one in country-code top-level domains and most databases; a three-letter alpha-3, used on passports and in many datasets; and a three-digit numeric code that keeps its leading zeros, so Afghanistan is 004 and Andorra 020 rather than 4 and 20. The list holds all 249 officially assigned entries, from Afghanistan (AF) to Zimbabwe (ZW). Kosovo, Northern Cyprus and other territories without an assigned code are not in it, and neither are the European Union or the United Nations: an entry that matches nothing is reported rather than guessed.

Names are the ISO English short names. The matcher also accepts the ISO official names (Federal Republic of Germany), the ISO common names where one is published (South Korea, Vietnam), the fuller names some tables print (United Kingdom of Great Britain and Northern Ireland) and a handful of everyday alternatives such as Britain, Holland, Ivory Coast or Burma. Matching ignores case, accents and punctuation, so cote d'ivoire finds Côte d'Ivoire, and a two- or three-letter entry that happens to be a code is read as that code, which is why and returns Andorra (AND). Everything runs in your browser with no storage, uploads or network access.