MeridianMERIDIAN

Country Code

geography.location.country_code

ISO 3166-1 alpha-2 country code (2 letters, e.g., US, FR, JP). Universal format.

Try a value

Country Code's rule accepts it.

Reads it as US

Also accepted by

Shape

Pattern
^[A-Z]{2}$
ValueLengthShape
US2matches
FR2matches
JP2matches
DE2matches
CA2matches
U1rejected: one character short

Told apart

1 of the 5 other location types accept every one of these samples on shape alone.

Going the other way, this type's own rule accepts 5 of 6 samples of State/Province Code.

The list

ISO 3166-1 country codes with their three-letter and numeric forms, as CLDR records them; the ISO 3166 Maintenance Agency assigns them.

249 of 249

ISO 3166-1 alpha-2 country codes
Alpha-2Alpha-3NumericName
ADAND020Andorra
AEARE784United Arab Emirates
AFAFG004Afghanistan
AGATG028Antigua & Barbuda
AIAIA660Anguilla
ALALB008Albania
AMARM051Armenia
AOAGO024Angola
AQATA010Antarctica
ARARG032Argentina
ASASM016American Samoa
ATAUT040Austria
AUAUS036Australia
AWABW533Aruba
AXALA248Åland Islands
AZAZE031Azerbaijan
BABIH070Bosnia & Herzegovina
BBBRB052Barbados
BDBGD050Bangladesh
BEBEL056Belgium
BFBFA854Burkina Faso
BGBGR100Bulgaria
BHBHR048Bahrain
BIBDI108Burundi
BJBEN204Benin
BLBLM652St. Barthélemy
BMBMU060Bermuda
BNBRN096Brunei
BOBOL068Bolivia
BQBES535Caribbean Netherlands
BRBRA076Brazil
BSBHS044Bahamas
BTBTN064Bhutan
BVBVT074Bouvet Island
BWBWA072Botswana
BYBLR112Belarus
BZBLZ084Belize
CACAN124Canada
CCCCK166Cocos (Keeling) Islands
CDCOD180Congo - Kinshasa
CFCAF140Central African Republic
CGCOG178Congo - Brazzaville
CHCHE756Switzerland
CICIV384Côte d’Ivoire
CKCOK184Cook Islands
CLCHL152Chile
CMCMR120Cameroon
CNCHN156China
COCOL170Colombia
CRCRI188Costa Rica
CUCUB192Cuba
CVCPV132Cape Verde
CWCUW531Curaçao
CXCXR162Christmas Island
CYCYP196Cyprus
CZCZE203Czechia
DEDEU276Germany
DJDJI262Djibouti
DKDNK208Denmark
DMDMA212Dominica
DODOM214Dominican Republic
DZDZA012Algeria
ECECU218Ecuador
EEEST233Estonia
EGEGY818Egypt
EHESH732Western Sahara
ERERI232Eritrea
ESESP724Spain
ETETH231Ethiopia
FIFIN246Finland
FJFJI242Fiji
FKFLK238Falkland Islands
FMFSM583Micronesia
FOFRO234Faroe Islands
FRFRA250France
GAGAB266Gabon
GBGBR826United Kingdom
GDGRD308Grenada
GEGEO268Georgia
GFGUF254French Guiana
GGGGY831Guernsey
GHGHA288Ghana
GIGIB292Gibraltar
GLGRL304Greenland
GMGMB270Gambia
GNGIN324Guinea
GPGLP312Guadeloupe
GQGNQ226Equatorial Guinea
GRGRC300Greece
GSSGS239South Georgia & South Sandwich Islands
GTGTM320Guatemala
GUGUM316Guam
GWGNB624Guinea-Bissau
GYGUY328Guyana
HKHKG344Hong Kong SAR China
HMHMD334Heard Island & McDonald Islands
HNHND340Honduras
HRHRV191Croatia
HTHTI332Haiti
HUHUN348Hungary
IDIDN360Indonesia
IEIRL372Ireland
ILISR376Israel
IMIMN833Isle of Man
ININD356India
IOIOT086British Indian Ocean Territory
IQIRQ368Iraq
IRIRN364Iran
ISISL352Iceland
ITITA380Italy
JEJEY832Jersey
JMJAM388Jamaica
JOJOR400Jordan
JPJPN392Japan
KEKEN404Kenya
KGKGZ417Kyrgyzstan
KHKHM116Cambodia
KIKIR296Kiribati
KMCOM174Comoros
KNKNA659St. Kitts & Nevis
KPPRK408North Korea
KRKOR410South Korea
KWKWT414Kuwait
KYCYM136Cayman Islands
KZKAZ398Kazakhstan
LALAO418Laos
LBLBN422Lebanon
LCLCA662St. Lucia
LILIE438Liechtenstein
LKLKA144Sri Lanka
LRLBR430Liberia
LSLSO426Lesotho
LTLTU440Lithuania
LULUX442Luxembourg
LVLVA428Latvia
LYLBY434Libya
MAMAR504Morocco
MCMCO492Monaco
MDMDA498Moldova
MEMNE499Montenegro
MFMAF663St. Martin
MGMDG450Madagascar
MHMHL584Marshall Islands
MKMKD807North Macedonia
MLMLI466Mali
MMMMR104Myanmar (Burma)
MNMNG496Mongolia
MOMAC446Macao SAR China
MPMNP580Northern Mariana Islands
MQMTQ474Martinique
MRMRT478Mauritania
MSMSR500Montserrat
MTMLT470Malta
MUMUS480Mauritius
MVMDV462Maldives
MWMWI454Malawi
MXMEX484Mexico
MYMYS458Malaysia
MZMOZ508Mozambique
NANAM516Namibia
NCNCL540New Caledonia
NENER562Niger
NFNFK574Norfolk Island
NGNGA566Nigeria
NINIC558Nicaragua
NLNLD528Netherlands
NONOR578Norway
NPNPL524Nepal
NRNRU520Nauru
NUNIU570Niue
NZNZL554New Zealand
OMOMN512Oman
PAPAN591Panama
PEPER604Peru
PFPYF258French Polynesia
PGPNG598Papua New Guinea
PHPHL608Philippines
PKPAK586Pakistan
PLPOL616Poland
PMSPM666St. Pierre & Miquelon
PNPCN612Pitcairn Islands
PRPRI630Puerto Rico
PSPSE275Palestinian Territories
PTPRT620Portugal
PWPLW585Palau
PYPRY600Paraguay
QAQAT634Qatar
REREU638Réunion
ROROU642Romania
RSSRB688Serbia
RURUS643Russia
RWRWA646Rwanda
SASAU682Saudi Arabia
SBSLB090Solomon Islands
SCSYC690Seychelles
SDSDN729Sudan
SESWE752Sweden
SGSGP702Singapore
SHSHN654St. Helena, Ascension & Tristan da Cunha
SISVN705Slovenia
SJSJM744Svalbard & Jan Mayen
SKSVK703Slovakia
SLSLE694Sierra Leone
SMSMR674San Marino
SNSEN686Senegal
SOSOM706Somalia
SRSUR740Suriname
SSSSD728South Sudan
STSTP678São Tomé & Príncipe
SVSLV222El Salvador
SXSXM534Sint Maarten
SYSYR760Syria
SZSWZ748Eswatini
TCTCA796Turks & Caicos Islands
TDTCD148Chad
TFATF260French Southern and Antarctic Lands
TGTGO768Togo
THTHA764Thailand
TJTJK762Tajikistan
TKTKL772Tokelau
TLTLS626Timor-Leste
TMTKM795Turkmenistan
TNTUN788Tunisia
TOTON776Tonga
TRTUR792Türkiye
TTTTO780Trinidad & Tobago
TVTUV798Tuvalu
TWTWN158Taiwan
TZTZA834Tanzania
UAUKR804Ukraine
UGUGA800Uganda
UMUMI581U.S. Outlying Islands
USUSA840United States
UYURY858Uruguay
UZUZB860Uzbekistan
VAVAT336Vatican City
VCVCT670St. Vincent & Grenadines
VEVEN862Venezuela
VGVGB092British Virgin Islands
VIVIR850U.S. Virgin Islands
VNVNM704Vietnam
VUVUT548Vanuatu
WFWLF876Wallis & Futuna
WSWSM882Samoa
YEYEM887Yemen
YTMYT175Mayotte
ZAZAF710South Africa
ZMZMB894Zambia
ZWZWE716Zimbabwe

Unicode CLDR 49 · as of 21 October 2026 · 249 rows

Codes and English names from the Unicode Common Locale Data Repository (CLDR 49), © 1991–2026 Unicode, Inc., under the Unicode License v3. Code elements are assigned by ISO 3166/MA; see iso.org/iso-3166-country-codes.

Background

Origin

ISO 3166-1 alpha-2 codes are two-letter country codes defined in ISO 3166-1, part of the ISO 3166 standard published by the International Organization for Standardization (ISO).[1] ISO 3166-1 alpha-2 codes represent countries, dependent territories, and special areas of geographical interest.[1] ISO 3166-1 defines three sets of country codes: alpha-2, alpha-3 and numeric.[2] The country codes have been published as ISO 3166-1 since 1997, when ISO 3166 was expanded into three parts.[2]

According to the ISO 3166 Maintenance Agency (ISO 3166/MA), a new country name can enter ISO 3166-1 only by being registered in the United Nations Terminology Bulletin Country Names or in the UN Statistics Division's Country and Region Codes for Statistical Use.[2] According to the ISO 3166/MA, the codes are chosen "to reflect the significant, unique component of the country name in order to allow a visual association between country name and country code".[2] The United Kingdom is officially assigned the alpha-2 code GB rather than UK, based on its official name "United Kingdom of Great Britain and Northern Ireland".[2] Germany is assigned the alpha-2 code DE, based on its native name "Deutschland".[2]

ISO 3166-1 has 249 current officially assigned alpha-2 codes.[1] The alpha-2 codes AA, QM to QZ, XA to XZ, and ZZ can be user-assigned.[1][2] The ISO 3166/MA will never use user-assigned codes when updating the standard.[1][2] ISO 3166-1 divides its reserved alpha-2 codes into exceptional reservations, transitional reservations and indeterminate reservations.[1] A country is normally assigned new ISO 3166-1 codes if it changes its name or its territorial boundaries.[2] As of July 2013, ISO publishes changes to ISO 3166-1 in its online catalogue only, and no longer publishes newsletters.[2]

Use

Starting in 1985, ISO 3166-1 alpha-2 codes have been used in the Domain Name System as country code top-level domains (ccTLDs).[1] The United Kingdom, whose alpha-2 code is GB, uses .uk instead of .gb as its ccTLD.[1] Treat a domain suffix as a close cousin of the alpha-2 code rather than the same thing, and map the exceptions before joining one to the other. (Meridian's view)

Eurostat's glossary of country codes lists EL as the code for Greece.[3] Eurostat's glossary of country codes lists UK as the code for the United Kingdom.[3] Eurostat's glossary of country codes lists XK as the code for Kosovo.[3] Eurostat's glossary notes that XK is a code used for practical reasons and not an official ISO country code.[3] The code XK is used by the European Commission, the IMF, SWIFT, the CLDR and other organisations as a temporary country code for Kosovo.[1] The Unicode Common Locale Data Repository (CLDR) assigns the user-assigned code ZZ to represent "Unknown or Invalid Territory".[1]

FIPS 10-4 was a list of two-letter country codes used by the U.S. Government for geographical data processing in many publications, such as the CIA World Factbook.[4] FIPS 10-4 codes are similar to, but sometimes incompatible with, the ISO 3166-1 alpha-2 country codes.[4] On September 2, 2008, NIST withdrew FIPS 10-4 as a Federal Information Processing Standard.[4][5] In FIPS 10-4, GM is the code for Germany.[5] In FIPS 10-4, AS is the code for Australia.[5] The UN Statistics Division's M49 table gives GM as the ISO-alpha2 code for Gambia.[6] The UN Statistics Division's M49 table gives AS as the ISO-alpha2 code for American Samoa.[6] The UN Statistics Division's M49 table gives AU as the ISO-alpha2 code for Australia.[6] Two-letter codes that came from older US government sources deserve a spot check against a few countries you know before you trust them as ISO codes. (Meridian's view)

The UN Statistics Division's M49 table gives NA as the ISO-alpha2 code for Namibia.[6] The pandas IO documentation lists 'NA' among the default values that are recognised as missing (NaN) when reading text files.[7] The pandas IO documentation says that specifying keep_default_na=False completely overrides the default values that are recognised as missing.[7] Read a country column as text with default missing-value detection switched off, then check that Namibia is still there. (Meridian's view)

Where you'll meet it

The UN Statistics Division's table of standard country or area codes for statistical use (M49) publishes an ISO-alpha2 code beside each country or area's M49 code.[6] GLEIF's Accepted Legal Jurisdictions Code List is based on ISO 3166 and specifies more than 300 different codes.[8]

Detection notes

v1 migration: Was address.country_code. Transform uppercases. ISO 3166-1 alpha-2 standard. Enum contains 249 officially-assigned codes. User-assigned ranges (AA, QM-QZ, XA-XZ, ZZ) excluded.

In Meridian's open data

Use it

CLI · DuckDB
$ finetype infer -i "US" --mode column
→ geography.location.country_code

SELECT ft_infer('US');
-- → 'geography.location.country_code'
Cast expression
UPPER(CAST({col} AS VARCHAR))

Schema

https://meridian.online/schemas/geography.location.country_code · Frictionless type string

finetype taxonomy geography.location.country_code -o json-schema

Aliases

iso_3166_1_alpha_2

Type Registry