ISO 3166 Country and Region Codes: The Basics

Codes like CN, USA, and 392 show up on domain suffixes, international shipping labels, and passport information pages. They all actually come from the same international standard β€” just expressed in different forms.

Two-letter code (Alpha-2)

Made up of two uppercase letters β€” for example, China is CN, the United States is US, and Japan is JP. This is the most widely used of the three formats and commonly appears in internet country-code top-level domains, such as .cn and .jp.

Three-letter code (Alpha-3)

Made up of three uppercase letters β€” for example, China is CHN, the United States is USA, and Japan is JPN. Compared with the two-letter code, it's somewhat more readable, and it's commonly used in passport machine-readable zones and as country designations in international sporting events.

Numeric code

Made up of three digits β€” for example, China is 156, the United States is 840, and Japan is 392. Because it doesn't depend on any particular script, the numeric code is often used in technical systems and databases that need an internal identifier independent of the Latin alphabet.

The three code types can't be inferred from each other by guessing

The two-letter, three-letter, and numeric codes are each assigned independently. While the two-letter and three-letter codes for most countries look fairly similar (like CN and CHN), there's no direct formula linking numeric codes to letter codes β€” you need to look them up in a reference table to convert accurately.

Country top-level domains are mostly taken directly from the two-letter code

Country and region top-level domain suffixes like .cn, .jp, and .uk are mostly taken directly from the corresponding ISO 3166 two-letter code, which is why many people can roughly guess a website's registration region just from the domain ending.

Passport machine-readable zones and some international shipping documents commonly use the three-letter code

The machine-readable zone at the bottom of a passport's information page typically uses the three-letter code to indicate the holder's nationality, and some international courier and air waybills also use three-letter codes for the destination country β€” which isn't quite the same as the two-letter code commonly seen in web addresses.

The standard also covers subnational codes

Beyond country-level codes, ISO 3166 has a companion part that assigns codes to a country's provinces, states, or other first-level administrative divisions (for example, CN-BJ represents Beijing, China). These are commonly seen in international software systems that filter or report data by region.

Why does the same country have three different codes

Different use cases have different needs around code length, readability, and technical compatibility: domain systems favor short two-letter codes, documents and tickets favor the somewhat more readable three-letter codes, and underlying databases or systems that don't rely on the Latin alphabet favor purely numeric codes. ISO 3166 maintains all three code sets precisely to serve these different needs.

Do codes change once assigned

Country codes are generally stable, but when a country changes its name, splits apart, or merges with another, the standard's maintaining body will adjust or reassign the relevant codes accordingly. So when working with historical data or long-term archival systems, it's worth keeping in mind that country codes themselves can occasionally be updated as international circumstances change.

Frequently Asked Questions

What are China's three ISO 3166 codes?

China's two-letter code is CN, its three-letter code is CHN, and its numeric code is 156. All three point to the same country β€” they're just used in different contexts and systems.

Are ISO 3166 codes the same thing as international telephone country codes?

No. ISO 3166 is a standard for letter and numeric country/region codes, mainly used for addresses, domain names, and identity documents. International telephone codes (like +86 for China) are assigned and maintained separately by the International Telecommunication Union (ITU). The two systems are independent of each other and shouldn't be mixed up.