Published

Postal codes are the easy part: what global companies actually need from reference data

Only 131 of 249 countries and territories have postal codes we can publish, every country codes its regions differently, and names are needed in several languages. What a large manufacturer's request shows about reference data.

"We need a worldwide postal-code database" is one of the most common requests we get at DataHub. It comes from retailers checking addresses at checkout, logistics teams routing parcels and pricing delivery, banks validating customer records, and analysts joining data by region.

When we work through what these teams actually need, the conversation moves away from postal codes fast. The same four needs come up again and again:

  1. Coverage: postal codes for every country, or at least for every country they ship to.
  2. Clear codes for regions: knowing whether a region code is an ISO code, a national official code, or someone's own identifier.
  3. Regions as data in their own right: a list of provinces, counties and districts, not just the ones that happen to appear next to a postal code.
  4. Names in more than one language: local names, English, and the official languages of multilingual countries.

On top of that, almost every company has a few fields of its own. This post goes through each need with data, and shows why "postal codes" is the easy part of reference data.

Not every country has postal codes

Start with coverage, because the answer surprises people. ISO 3166-1 lists 249 countries and territories. We publish postal codes for 131 of them.

World map of the 249 ISO 3166 countries and territories coloured by postal-code status. Most of the Americas, Europe, Russia, China, India, Southeast Asia and Australia have postal codes on DataHub (131). Large parts of Central and West Africa, and Qatar, have no postal-code system (50). Several countries in North and East Africa, the Middle East, Central Asia, Myanmar, Venezuela and Cuba have postal codes only from closed or paid sources (60). South Korea and Paraguay are among 8 with an open source not yet added.

Bar of the 249 countries and territories: 131 with postal codes on DataHub, 8 with an open source not yet added, 60 where codes exist but only closed or paid sources, 50 with no postal-code system.

The other 118 fall into three groups:

  • No postal-code system (50). Many countries never introduced one, or deliver by PO box, building number or neighbourhood instead. Qatar, Jamaica, the Bahamas, Angola and much of Central and West Africa are in this group. For some of them we publish a directory of localities and districts instead, with the postal-code column left empty on purpose.
  • Codes exist, but only behind closed doors (60). Saudi Arabia, Israel, Egypt, Kazakhstan, Nigeria and Venezuela all use postal codes, but the national post either sells them, offers only a one-at-a-time lookup on its website, or publishes no terms we could rely on. "Open data" stops here.
  • An open source exists and we haven't added it yet (8). South Korea, Paraguay and Armenia are already in GeoNames under an open licence; La Poste publishes Saint-Barthélemy and Saint-Martin in its open file. These are on our list.

So the honest answer to "all 249?" is: every country and territory can be in the divisions table, because every one of them has an ISO code and most have regions, but postal codes stop where national postal systems stop. Any vendor promising postal codes for all 249 is counting differently.

The status of each country is in data/countries.csv:

Many of the "no postal-code system" calls rest on Universal Postal Union addressing sheets, some of them old. We re-check a country before telling a customer it has no codes.

Every country codes its regions differently

"What do the region codes mean?" has a different answer for almost every country. Postal datasets usually carry three administrative levels with a name and a code each, but the code systems underneath are whatever each country uses. Here is one place in each of ten large economies, as the codes appear in postal data:

CountryExampleLevel 1 codeSame region in ISO 3166-2Level 2 codeLevel 3 code
AustraliaSydneyNSWAU-NSW17200 (ABS local government area)–
CanadaTorontoONCA-ON3520 (census division)3520005 (census subdivision)
ChinaHefeiCN-AH (ISO 3166-2)CN-AH3401 (GB/T 2260 prefecture, first 4 of 6 digits)–
FranceLyon84 (INSEE region)FR-ARA69 (département)691 (arrondissement)
GermanyMunichBY (ISO without prefix)DE-BY091 (Regierungsbezirk)09162 (Kreisschlüssel)
ItalyMilan25 (ISO region number)IT-25MI (province abbreviation)–
JapanSapporo01 (prefecture number)JP-01a GeoNames ID, not an official code01102 (JIS X 0402)
SpainSevilleAN (ISO without prefix)ES-AN41 (INE province)41091 (INE municipality)
United KingdomWestminsterE92000001 (ONS GSS)GB-ENGE09000033 (GSS district)E05… (GSS ward)
United StatesLos AngelesCA (USPS)US-CA06037 (Census FIPS county)–

Three things follow:

  • The same region has several codes. England is E92000001 to the Office for National Statistics and GB-ENG to ISO. Auvergne-Rhône-Alpes is 84 to INSEE and FR-ARA to ISO. If two of your systems use different ones, they won't join.
  • Not every code is official. Open datasets often fill a gap with their own identifiers, as GeoNames does for Japan's cities. That is fine as long as the data says so. A code that looks official but isn't is worse than a blank.
  • "Level 2" means different things. In Germany it is the Regierungsbezirk, which only some states have; in France the département; in Canada a census division. A level number on its own tells you little.

Our answer is to put a code_system on every code, so a reader always knows whether 3520 is a StatCan census division or something else, and to keep a crosswalk to ISO 3166-2 at level 1, which is the only level with one code system worldwide.

Codes by country: data/admin-code-systems.csv.

Divisions are a dataset of their own

Most requests end up asking for three tables, not one, and that is the right design. A postal-code file only contains the regions that happen to have postal codes, and it repeats each region on thousands of rows. A company that wants a dropdown of provinces, or a list of every county to assign to a shipping zone, needs the divisions themselves.

A small example of the three tables, joined on codes:

divisions

CountryLevelCodeCode systemParentEnglishLocal
ES0ESISO 3166-1–SpainEspaña
ES1ES-CTISO 3166-2ESCataloniaCatalunya
ES2ES:08INE provinceES-CTBarcelonaBarcelona
ES3ES:08019INE municipalityES:08BarcelonaBarcelona
US1US-CAISO 3166-2USCaliforniaCalifornia
US2US:06037Census FIPSUS-CALos Angeles CountyLos Angeles County

postal_codes and postal_code_divisions

CountryPostal codePlaceLevel 1Level 2Level 3
ES08002BarcelonaES-CTES:08ES:08019
US90012Los AngelesUS-CAUS:06037–

How big is the divisions table? At level 1 alone, ISO 3166-2 has 3,590 subdivisions in 200 countries. The other 49 countries and territories, mostly small islands and overseas territories, have no subdivisions at all.

Bar chart of the 249 countries and territories by number of first-level divisions in ISO 3166-2: 49 have none, 67 have 1 to 9, 78 have 10 to 19, 45 have 20 to 49, 9 have 50 to 99, and 1 has more than 100.

The one country with more than 100 is Slovenia, whose 212 municipalities are its first level in ISO 3166-2. Russia (83), Türkiye (81), North Macedonia (80) and Thailand (78) follow. Below level 1 the numbers grow fast: about 3,100 counties in the United States, about 8,100 municipalities in Spain and about 5,200 census subdivisions in Canada.

No single open source has official codes for every level of every country under a licence that allows commercial use. The most complete global boundary set, GADM, is free for academic and non-commercial use only. So the practical recipe is layers: ISO 3166-2 for level 1 everywhere, national statistics offices for the countries that matter most, and open global sources, clearly labelled, for the rest.

Names in more than one language

Address forms, invoices and reports often need a region's name in more than one language: the local name, an English one, and in multilingual countries every official language. Spain has co-official languages in several regions (Catalan, Basque, Galician and others), Canada has two official languages, and the United Kingdom recognises Welsh and Scottish Gaelic.

Wikidata, the open knowledge base behind Wikipedia, has names in hundreds of languages for most administrative divisions, and it carries each country's official codes, so names can be joined on codes rather than on spelling. We measured how many divisions have a name in a second language there:

Heatmap of the share of divisions with a name in a second language in Wikidata, joined on official codes. Canada French: 100, 93 and 78 percent at levels 1 to 3. United Kingdom Welsh: 100, 98, 21. Scottish Gaelic: 100, 20, 0.4. Spain Catalan, Basque and Galician: 98 to 100 percent at every level. Italy German and Slovenian: 99 to 100 percent. United States Spanish: 98 and 95.5. For comparison, Chinese names: Canada 92, 16, 7; United Kingdom 100, 52, 0.8.

Three lessons:

  • Official languages are well covered; others thin out further down. Spain's municipalities have names in Catalan, Basque and Galician almost everywhere. Canada's census subdivisions have French names in 78% of cases. But for a language that isn't local, such as Chinese in Canada or the UK, coverage falls from nearly complete at level 1 to under 10% at level 3.
  • Not every name is right. One UK council area came back with a Chinese label meaning "Edinburgh politics", because its code was attached to two different items and we picked the wrong one. Many labels are also in the wrong script variant. A wrong name in a checkout form is worse than a missing one, so we never machine-translate and we leave a name blank when no established name exists.
  • A label is not an official name. Spain's municipalities have official names in Catalan, Basque and Galician. Wikidata records those separately from the everyday label, and only for some municipalities. For official local names, the national register wins.

Coverage by country, language and level: data/name-coverage.csv.

The fields companies add on top

Even with clean codes and names, the list doesn't stop there. What companies really want are answers about each postal code that no postal authority publishes in one place. For a business that ships goods, these are typical:

  • Special tax and customs territories. Some postal codes are inside a country but outside its VAT or customs area. Shipping to them means different duties and paperwork.
  • Military, PO-box-only and business-only codes, which some carriers won't deliver to or treat differently.
  • Remote areas, as each carrier defines them, with their surcharges.
  • The company's own shipping zones, mapped onto postal codes.

The first of these is a short, stable table. These territories are part of an EU country but outside its VAT area, and some are outside the customs territory too, under Article 6 of the EU VAT Directive (2006/112/EC):

TerritoryCountryPostal codesEU VAT areaEU customs territory
Canary IslandsES35xxx, 38xxxoutsideinside
Ceuta, MelillaES51xxx, 52xxxoutsideoutside
Büsingen am HochrheinDE78266outsideoutside
HeligolandDE27498outsideoutside
LivignoIT23041outsideoutside
Campione d'ItaliaIT22061outsideinside
Mount AthosGR63086outsideinside
Åland IslandsAX22xxxoutsideinside
French outermost regionsFR971xx–974xx, 976xx, 97150outsideinside

Even a table this small has traps. Two of these places have changed postal code, and some open datasets still carry the old ones (Livigno 23030, Campione d'Italia 22060). The French regions and Åland also have their own ISO country codes (GP, MQ, GF, RE, YT, MF, AX), so the same address can be filed under two countries.

Full list with notes: data/special-territories.csv.

The other fields depend on the customer: their carriers' remote-area lists, their own zones. That is the pattern we see again and again: a shared base of open, well-documented reference data, and a thin layer of fields specific to one company, built with them.

Who needs this

The same shape of request turns up well beyond shipping:

  • Banks and payment companies keep country, currency, holiday and subdivision tables for onboarding and compliance, and need to know which codes are official.
  • Marketplaces and retailers need clean address forms in many languages, and regions that match how each country actually divides itself.
  • Logistics companies need postal codes, airports and ports joined to the same regions.
  • Public bodies and researchers need stable codes and a record of when divisions change.

What they share is that the base data is public but scattered across hundreds of national sources with different formats, licences and update cycles, and the value is in putting it together carefully, saying where every value came from, and keeping it current.

How we build it

A few rules hold for everything above:

  • Official or openly licensed sources only, with the licence recorded for each source before we use it, and attribution shipped with the data.
  • A code system on every code, and never a home-made identifier dressed up as an official one.
  • No machine-translated names. Blank is better than wrong.
  • No data under non-commercial or share-alike terms in anything we license onwards, which rules out GADM and OpenStreetMap-derived data.
  • Provenance for every release: which file, from where, when, and its checksum.

Our worldwide postal code database covers the 131 countries in blue on the map, one country per file in one schema, and our country and region reference data covers the divisions side. If you need something like this, with your own fields on top, get in touch.

About the data in this post

  • Postal-code status comes from our postal-code product as of 16 November 2026, and from a country-by-country review of postal systems and sources (UPU addressing sheets and national post websites) done in November 2026. "Published" means we have a file with postal codes; 11 countries whose files list localities without postal codes are counted under "no postal-code system". countries.csv
  • Divisions are ISO 3166-2 first-level subdivisions as published in Unicode CLDR release 49 (Unicode License v3), with the country list from ISO 3166-1. ISO allows free use of its country codes.
  • Names were measured in Wikidata (CC0) on 19 November 2026 by joining each country's official code property and counting labels per language; for Chinese, only zh-hans and zh-cn count. Several queries ran on the QLever mirror of Wikidata because the main query service was throttled that day.
  • Special territories are from Article 6 of Council Directive 2006/112/EC (consolidated text of 1 January 2025, EUR-Lex), read on 19 November 2026. Postal codes were checked against GeoNames and, for Livigno, Campione d'Italia and Mount Athos, against Wikidata.
  • Code examples are from our country datasets' documentation; the map uses Natural Earth (public domain), on which many small territories are too small to see.
  • Charts are made by src/make_charts.py from the CSVs in data/; the country table by src/prepare_data.py.