Tuesday 27 October 2026
Trending
Explained2 min read

Behind .fr and .au: how ISO country codes work

Website endings like .fr and .au come from ISO 3166, a shared set of country codes. Here is what the codes are, where they are used and who keeps them.

Key points

  • ISO 3166 sets letter and number codes for countries, but country names come from UN sources.
  • The codes are used for mail, website endings, passports and bank transfers.
  • Each country can have a two-letter, a three-letter and a three-digit code.
  • A maintenance agency gives codes to new UN member states after the UN tells it.

Website names ending in “.fr” for France or “.au” for Australia use shared country codes. That set is called ISO 3166. It gives each country short codes of letters and numbers.

Codes, not names

ISO 3166 sets the codes, but it does not set country names. The names come from United Nations sources. The codes exist because a country’s name changes from one language to another. A code is understood everywhere, which saves time and avoids errors.

Where the codes turn up

Website addresses are only one use. Postal services around the world use the codes to label containers of international mail. Machine-readable passports use them to show a holder’s nationality. When money moves between banks, the codes help show where a bank is based.

Three ways to write a country

Each country can have three codes. The two-letter code, called alpha-2, is the one ISO recommends for general use. The three-letter alpha-3 code sits closer to the country’s name. A three-digit number, numeric-3, helps when Latin letters are a problem.

Codes inside countries

The standard also covers regions within a country. These codes start with the country’s two letters, then add up to three more characters. ID-RI is the Riau province of Indonesia, while NG-RI is the Rivers province in Nigeria. Same ending, different place. Names for these usually come from official national sources.

A third part keeps old codes that are no longer in use. These formerly used codes have four letters.

Who keeps the list

A group called the ISO 3166 Maintenance Agency updates the codes when names or regions change. It has members from 15 organizations. They include national standards bodies and global groups such as the Universal Postal Union.

How a new country gets a code

When the UN admits a new member state, it tells the agency. The agency then gives that country its two-letter and three-letter codes. The number code comes from the UN itself.

As a general rule, places that are not UN member states do not get official codes. The agency may still give codes to dependencies of member states. Such a place should, among other things, be physically separate from its parent country. Even then, the agency can say no, partly because two-letter codes are in short supply.

Free to use

ISO lets anyone use its country codes free of charge. No fee applies. The same goes for its currency and language codes. The up-to-date list is on ISO’s Online Browsing Platform.

Sources

Revanth Karra

Revanth Karra

I'm Revanth Karra, the founder and editor of Buzz Explained. I cover the news people are searching for right now and explain it in simple English: what happened, why it matters and what comes next. I check every story against its sources before I publish it.

See something wrong? Read our corrections policy and tell us at info@buzzexplained.com.

The news, explained in your inbox

One short email. The main point comes first.