ISO 3166
Codes for the representation of names of countries and their subdivisions.

ISO 3166-1

ISO 3166-1 (Codes for the representation of names of countries and their subdivisions – Part 1: Country codes) is a standard defining codes for the names of countries, dependent territories, and special areas of geographical interest.

The alphabetic country codes were first included in ISO 3166 in 1974, and the numeric country codes were first included in 1981. The country codes have been published as ISO 3166-1 since 1997, when ISO 3166 was expanded into three parts, with ISO 3166-2 defining codes for subdivisions and ISO 3166-3 defining codes for former countries.

As a widely used international standard, ISO 3166-1 is implemented in other standards and used by international organizations to allow facilitation of the exchange of goods and information. However, it is not the only standard for country codes. Other country codes used by many international organizations are partly or totally incompatible with ISO 3166-1, although some of them closely correspond to ISO 3166-1 codes.

alpha-2

Two-letter country codes which are the most widely used of the three, and used most prominently for the Internet's country code top-level domains (with a few exceptions).

alpha-3

Three-letter country codes which allow a better visual association between the codes and the country names than the alpha-2 codes.

numeric

Three-digit country codes which are identical to those developed and maintained by the United Nations (UN) Statistics Division, with the advantage of script (writing system) independence, and hence useful for people or systems using non-Latin scripts. It is a subset of the UN M49 Country and regional codes (UN M49).

ISO 3166-2

ISO 3166-2 (Codes for the representation of names of countries and their subdivisions – Part 2: Country subdivision code. It was first published in 1998) is a standard defining. codes for identifying the principal subdivisions (e.g., provinces or states) of all countries coded in ISO 3166-1.

The purpose of ISO 3166-2 is to establish an international standard of short and unique alphanumeric codes to represent the relevant administrative divisions and dependent territories of all countries in a more convenient and less ambiguous form than their full names. Each complete ISO 3166-2 code consists of two parts, separated by a hyphen:

Each complete ISO 3166-2 code can then be used to uniquely identify a country subdivision in a global context.

As of 29 November 2022 there are 5,043 codes defined in ISO 3166-2. For some countries, codes are defined for more than one level of subdivisions.

ISO 3166-3

ISO 3166-3 (Codes for the representation of names of countries and their subdivisions – Part 3: Code for formerly used names of countries) is a standard codes for country names which have been deleted from ISO 3166-1 since its first publication in 1974. It was first published in 1999.

Besides the former country name and its ISO 3166-3 code, each entry in ISO 3166-3 also contains its former ISO 3166-1 codes, its period of validity, and the new country names and ISO 3166-1 codes used after its deletion from ISO 3166-1.

After a country is deleted from ISO 3166-1, its alpha-2 and alpha-3 codes will be transitionally reserved for a transitional period of at least fifty years. After the expiration of the transitional period, these codes are free to be reassigned.

If a country changes its name without any territorial change, its ISO 3166-1 numeric code remains the same. For example, when Burma was renamed Myanmar without territorial change in 1989, its alphabetic codes were changed, but its numeric code 104 has remained the same.

Currently, a few ccTLDs using deleted alpha-2 codes are still active or being phased out. However, alpha-2 codes which were deleted before the popularization of the Domain Name System in the late 1980s and early 1990s were never used for the Internet's country code top-level domains (ccTLDs). Likewise, ISO 3166-2, the ISO standard for country subdivision codes which was first published in 1998, predated the deletion of many alpha-2 codes.

alpha-3

alpha-4

Each former country name in ISO 3166-3 is assigned a four-letter alphabetic code. The first two letters are the ISO 3166-1 alpha-2 code of the former country, while the last two letters are allocated according to the following rules:[2]

  • If the country changed its name, the new ISO 3166-1 alpha-2 code is used (e.g., Burma changed its name to Myanmar, whose new alpha-2 code is MM), or the special code AA is used if its alpha-2 code was not changed (e.g., Byelorussian SSR changed its name to Belarus, which has kept the same alpha-2 code).
  • If the country merged into an existing country, the ISO 3166-1 alpha-2 code of this country is used (e.g., the German Democratic Republic merged into Germany, whose alpha-2 code is DE).
  • If the country was divided into several parts, the special code HH is used to indicate that there is no single successor country (e.g., Czechoslovakia was divided into the Czech Republic and Slovakia), with the exception of Serbia and Montenegro, for which XX is used to avoid duplicate use of the same ISO 3166-3 code, as the alpha-2 code CS had twice been deleted from ISO 3166-1, the first time due to the split of Czechoslovakia and the second time due to the split of Serbia and Montenegro.

numeric

UN M49 — Standard Country or Area Codes for Statistical Use

{ Formal name “Standard Country or Area Codes for Statistical Use (Series M, No. 49)”. They are a superset of the ISO 3166-1 numeric 3-digit country codes. }

References and Further Reading