Also available in: Español · Português · Français · العربية
Country Codes
ISO 3166-1, the domain root zone and the ITU calling codes — searchable, and honest about where they contradict each other.
What are country codes?
There is no such thing as “the” country code, and that is the first useful thing to know. The phrase names at least three different registries, maintained by three different organisations for three different purposes, and they do not agree with each other about what a country is.
ISO 3166-1 is the standard most people mean. It gives every country three codes: a two-letter alpha-2 (DE), a three-letter alpha-3 (DEU) and a three-digit numeric code (276). There are 249 officially assigned entries. The alpha-2 is the one you meet daily, in language tags, currency codes, shipping forms and the top-level domain system.
The domain system is the second registry. IANA delegates two-letter top-level domains from the root zone, and there are 248 of them — a different number, because the two registries have four disagreements in one direction and five in the other. The third is the ITU, which assigns the calling codes you dial. There are 205 distinct calling codes for 249 countries, which tells you immediately that the relationship is not one-to-one.
This table carries all of them, generated from the primary sources rather than copied from another table: the codes are cross-checked against Unicode CLDR, the domains come from IANA's daily root zone file, and the country names in all five languages come from CLDR rather than from a translation pass.
How to use this page
- Type anything you already know into the search box. It matches country names, alpha-2, alpha-3, the numeric code, the domain with or without its dot, and the calling code. Exact code matches are ranked first, so searching “de” puts Germany at the top rather than burying it under Sweden, Denmark and Bangladesh, all of which contain those two letters.
- Click any code to copy it. Every code in the table is a copy button. Nothing is sent anywhere when you do it — the whole table is already in your browser.
- Read the three sections below the table when a code surprises you. They list the four domains that are not ISO codes, the five ISO codes with no domain, and every calling code that reaches more than one country. Those are the cases that break naive code, and they are the reason this page exists.
Where the registries disagree, and why
One rule holds without a single exception: where a country has a delegated two-letter domain, that domain is its alpha-2 code lowercased. There is no country whose domain is some other country's code. That is worth stating plainly, because the exceptions all sit on the other side of the relationship — domains with no ISO code behind them.
There are exactly four, and the striking thing is that no two share an explanation. The domain .ac serves Ascension Island, whose code is exceptionally reserved in ISO 3166-1 rather than officially assigned. The domain .eu names the European Union, which is a group of countries and not a country. The domain .su was the Soviet Union's, and it is still delegated more than thirty years after that state ceased to exist. And .uk is not an ISO code at all: the code for the United Kingdom is GB, and UK is reserved purely so that it can never be assigned to anyone else.
That last one is the single most common mistake in software that handles country codes, because .uk is one of the most visible domains on the internet and GB is the value that will actually be in your data. A system that assumes the domain and the ISO code are interchangeable is right 244 times and wrong for the United Kingdom.
In the other direction, five officially assigned codes have no delegated domain: Saint Barthélemy, Bonaire, Western Sahara, Saint Martin and the United States Minor Outlying Islands. IANA's root zone database lists each of them explicitly as “Not assigned”, which is a different fact from being absent — the entry exists and records that nothing has been delegated.
Those two lists close neatly, and that is how the data on this page is checked. Take the 249 officially assigned codes, remove the five with no domain, and you get 244. Take the 248 delegated domains, remove the four that are not ISO codes, and you get 244 again. The two registries agree on exactly 244 entries, and every one of the nine remaining rows has a documented reason.
A calling code is not a country
The phone side has its own trap, and it is more damaging because it looks like it works. Calling codes are assigned by the ITU to numbering plans, not to countries, so the relationship is many-to-one: 56 of the 249 countries here — 22.5% of them — share their calling code with at least one other.
The extreme case is +1, which reaches 25 distinct ISO territories. The United States and Canada are the obvious two, but Puerto Rico, Jamaica, Barbados, the Bahamas, the Dominican Republic and eighteen others are on it as well, because they are all members of the North American Numbering Plan. Anything that infers a country from a leading +1 is guessing between twenty-five answers.
Smaller collisions are just as real and easier to miss. The code +44 covers the United Kingdom, Guernsey, the Isle of Man and Jersey. The code +39 covers Italy and Vatican City. The code +7 covers Russia and Kazakhstan. The code +212 covers Morocco and Western Sahara. If you need to know which country a number belongs to, the calling code is not enough information and no amount of table lookup will make it enough — you need the national number as well.
One territory has no calling code at all. The United States Minor Outlying Islands is officially assigned an ISO code and appears in every country list, and the ITU has no entry for it. It is a genuine hole rather than missing data, and this page shows it as such rather than inventing a plausible value.
Honest limits
This table is a snapshot. The root zone file it was generated from carries its own version number, and IANA updates it daily; ISO revises 3166-1 when countries change their names or their status. Nothing here fetches anything at runtime, so if a code changed after this page was built, this page does not know. The generator that produced it is in the repository, so regenerating is one command.
ISO 3166-1 itself is a document that has to be bought, which is a genuine obstacle to verifying a page like this. The codes on this page were cross-checked field by field against Unicode CLDR's own mappings — all 249 alpha-3 values and all 249 numeric values, with no mismatches — so they agree with the copy that browsers and operating systems actually use. That is a strong check, but it is a check against Unicode rather than against the standard document itself, and it is worth saying which one you are getting.
The calling codes were compared region by region against a widely used phone number library, and that comparison found two rows where the source data had leaked footnote markers into the values — a stray letter after the digits. Those are cleaned here. It is a small thing, but it is the kind of defect that survives in copied tables indefinitely, and it is the reason the generator strips everything that is not a digit rather than trusting the field.
Finally, the numeric codes are three digits and several of them begin with a zero — Bangladesh is 050, not 50. Any spreadsheet that has opened this data will have eaten those zeros. They are preserved here, which also means searching “44” finds both the United Kingdom's calling code and the Bahamas, whose numeric code is 044. Typing a leading plus restricts the search to calling codes.
Why is it free?
Because it is a table. The whole dataset is in the page you have already downloaded, the search runs in your browser, and nothing you type is sent anywhere — there is no server involved in looking up a country code.
So there is no account, no sign-up and nothing held back behind one. The generator that builds this data from Unicode CLDR and the IANA root zone is in the repository beside the page, along with the 1,342-assertion test suite that checks the codes, the closure relation between the two registries, and the calling code groups — including the negative controls that stop those tests passing for the wrong reason.