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.



