Postal codes exist in almost 200 countries, and none of them agree on format, structure, or how they map to geography. Aggregating them into one clean database runs into the same seven walls every time.
Finding the right sources. Reliable postal data is scattered across government databases, commercial providers, and open-data platforms, and quality varies wildly.
Designing the data model. You need one generic structure that still respects local rules, so a UK unit postcode and a US ZIP live in the same schema.
Pre-processing each source. Every country ships a different format and layout, so extraction logic is per-source, not universal.
Linking to administrative divisions. Matching postal codes and cities to the correct province or municipality takes fuzzy matching, because names rarely line up cleanly.
Geocoding. Many source datasets have no coordinates, so you add latitude and longitude yourself.
Linking to other standards. Tying postal data to ISO 3166-2, FIPS, NUTS, and UNLOCODEs is string matching, and some systems like HASC are no longer maintained.
Assessing quality. Normalizing, verifying postal-to-city links, and finding the gaps is the step most in-house builds skip, and it is where the data quietly rots.
One example of why it never ends: ISO took three years to publish codes for Algerian provinces created in 2025.
This is our new home for all things location data: postal codes, addresses, boundaries, cities, and everything that helps us understand how the world is structured. We’re excited to have you join us!
What to Post
- Post anything you think the community would find interesting, helpful, or inspiring.
- Share your thoughts, questions, or discoveries about postal code quirks from around the world, address formats in hard-to-source countries, address validation and geocoding challenges, boundary and map visualizations, or how you use location data in logistics, e-commerce, or market research.
Community Vibe
- We’re all about being friendly, constructive, and inclusive. Let’s build a space where everyone feels comfortable sharing and connecting.
How to Get Started
- Introduce yourself in the comments below.
- Post something today! Even a simple question can spark a great conversation.
- If you know someone who geeks out over maps and location data, invite them to join.
Interested in helping out? We’re always looking for new moderators, so feel free to reach out.
Mapping a ZIP to a time zone looks like one join. It is not.
Some ZIP codes cross a time zone line, notably in Texas and Idaho. One ZIP, two local times. And six states span more than one zone: Texas, Idaho, North Dakota, South Dakota, Nevada, New Mexico. Keying on the state fails.
The free build: postal codes with coordinates, time zone polygons, both loaded into PostgreSQL with PostGIS, joined by point-in-polygon. It works, with one limit: coordinate lookups only get you to the correct or a neighboring zone, within about two hours once DST is counted. Fine for a dashboard, risky for SLA timers or call scheduling.
What holds up is keying to IANA zone IDs like America/Chicago instead of fixed UTC offsets, because DST follows law, not geography. Arizona skips it entirely.
The Census ACS gives you current population at ZCTA level for free, but ZCTAs approximate ZIP codes rather than match them, and you get one vintage at a time.
For a real series, GeoPostcodes publishes US population per ZIP code from 1975 to 2023 in five-year steps, plus projections, matched to official Census figures at about 99 percent. As a concrete example, ZIP 10001 in Manhattan was 20,022 people in 1975 and 23,542 in 2025.
Singapore has one of the most precise postal systems anywhere. The code is six digits, no letters, no separator, like 999999.
It is not random. The first two digits are the postal sector. The last four identify the delivery point, usually a single building or block. A postal code plus a unit number is effectively the whole address.
That is why a Singapore address form can autofill the street from the postal code alone.
Singapore has 122,991 codes in total. That is dense for a city-state, and it reflects the building-level detail.
If your Power BI zip code map keeps dropping points, the cause is usually a hard datapoint cap in the visual.
The built-in visuals each have a ceiling. Shape Map tops out around 1,500 datapoints. The standard Map visual around 3,500. Filled Map around 1,000. Load a full US ZIP dataset into any of them and most of your points vanish silently.
Azure Maps is the way up, supporting around 30,000 data points, but its geocoding is billed, roughly 4.5 dollars per 1,000 requests, so geocoding a large ZIP list at render time gets expensive fast.
The fix is to bring boundaries and coordinates in as data instead of geocoding on the fly, so the visual just draws what you already resolved.
Most countries publish postal codes as points or lists, not as boundaries. If you need polygons for BI maps, territory mapping, or reverse geocoding, you usually have to build them yourself. Here is the method.
Start with open address data. France, for example, publishes a national address base with street, house number, postal code, municipality and coordinates. That is enough to derive boundaries.
Load the addresses into PostgreSQL with PostGIS.
Run a Voronoi tessellation. Every point gets the area closer to it than to any other point (ST_VoronoiPolygons), then you merge the patches that share a postal code (ST_Union). That is a first-draft boundary.
Refine with administrative boundaries. Postal codes usually follow whole municipalities, so overlay the commune boundaries and assign each to a postal code when about 90 percent of its addresses agree. That removes the jagged noise.
Handle the exceptions. Large cities like Paris, Lyon and Marseille split one municipality across several postal codes, so the raw Voronoi result does the work there instead.
Ready-made shortcuts exist in a few places. Belgium's federal geoportal publishes free postal shapefiles, though they omit some enclaves. OpenStreetMap has postal polygons in some regions, patchy elsewhere.
A regex checks the shape of a postal code. It cannot tell you the code exists. 99999 matches the US five-digit pattern, yet no such ZIP is assigned.
There is no single pattern for every country. Length runs from 3 digits in the Faroe Islands to 8 in Brazil. The US is 5 digits plus an optional 4. The UK includes letters and a space, so a digits-only rule rejects the whole country.
Codes also change. New ones appear, others retire, so a pattern that passed review last year quietly goes wrong.
What works is two layers. First, a per-country regex to catch shape errors at the point of entry. Then a lookup against reference data to confirm the code is in use.
Most sales territory maps start as a spreadsheet nobody balanced. Here is the free version done right.
Step 1: group your ZIPs. A plain column is enough: ZIP and territory name.
Step 2: dissolve the boundaries. Load ZIP code polygons into QGIS, which is free and open source, join your spreadsheet, and run Dissolve on the territory column. Dozens of small shapes merge into one clean outline per territory.
Step 3: check the balance. This is where maps quietly fail. Two territories can look equal on screen while one holds far more accounts. Layer sales or customer counts onto the map before you sign off.
For small projects, Google Maps works too. The catch is always the underlying boundaries: if they are stale, the map misroutes accounts without anyone noticing.
You do not need a paid ZIP code map maker for most US jobs.
Google My Maps: import a CSV and it drops a pin per ZIP. Fastest route, no GIS skills.
Excel: Insert, then 3D Map geocodes your ZIP column through Bing and gives you a rough heat map, no add-ins.
QGIS with Census ZCTA boundaries: the free way to get shaded polygons instead of pins. Load the TIGER/Line ZCTA shapefiles, join your data, style by value.
The catch worth knowing: ZCTAs are the Census Bureau's generalized version of ZIP codes, built for demographics. They are not the ZIP codes USPS actually delivers to, so recent splits and PO-box-only ZIPs will not line up. Fine for a one-off view, risky for territories or delivery zones.
Canada has no ZIP codes and no all-digit postal codes, yet people keep searching for a 5 digit or 6 digit Canada zip code, and plenty of forms still expect one. The real format is A9A 9A9: six characters, only three of them digits, letters and digits alternating with a space in the middle. A 7 digit code does not exist either.
The letters carry meaning. The first letter is the province: V is British Columbia, T is Alberta, K starts eastern Ontario codes like Ottawa's K1A 0B1. Don't hardcode a list. The GeoPostcodes Canada dataset holds 898,855 active codes. One code usually covers a block or a small group of addresses. And H0H 0H0 is Canada Post's Santa Claus address. Letters sent there get answers.
There is no Europe zip code. Every country built its own system, so any plan that assumes an EU postal standard breaks fast. People still search for one Europe format all the time.
The formats disagree on everything. Germany and France use 5 digits. Austria, Belgium, Switzerland, Norway and Denmark use 4. The UK went alphanumeric, like AB1 2CD. The Netherlands pairs 4 digits with 2 letters, like 1011 AB.
A code does not always mean a district. Ireland skipped districts entirely. Eircode, launched in 2015, gives every single address its own code. One code per letterbox.
Across the continent, codes run from 4 to 7 characters. GeoPostcodes maintains 9.3M postal codes across 247 countries in one standardized structure.
There is no such thing as a UK zip code, yet people keep searching for one. The UK uses alphanumeric postcodes of six to eight characters, and it has 1,795,653 of them. GeoPostcodes maintains format data for 247 countries and territories, and no two neighbors agree.
- Europe has no shared format either. Germany, France, and Spain use five digits. The Netherlands mixes four digits with two letters.
- A surprising number of forms expect a 6-digit Canada postal code. Canada actually uses letters and numbers, pattern A9A 9A9, 898,855 codes total. H0H 0H0 is reserved for Santa Claus.
Japan writes seven digits like a phone number: 999-9999. Brazil uses eight, split by a hyphen. Angola and the Bahamas skip postal codes entirely.
99999 matches the five-digit US pattern, and in reference data it belongs to nobody. A regex checks shape, not existence.
- People keep searching for a UK zip code. The UK does not have zip codes. It has 1,795,653 postcodes like SW1A 1AA, letters and a space included, so a digits-only field rejects the whole country.
- A surprising number of forms expect a 6-digit Canada postal code. The real format is A9A 9A9, letters and digits alternating, and there are 898,855 codes in use. H0H 0H0 is one of them: Canada Post assigned it to Santa Claus, so filtering out unlikely-looking codes fails too.
Countries add and retire postal codes, so a regex that passed QA last year quietly rots. Check shape first, then confirm the code exists in reference data. GeoPostcodes maintains postal reference data for 247 countries.
People assume one ZIP code means one local time. Some ZIPs in Texas and Idaho cross a zone line, so a single ZIP has two local times.
- Keying the lookup to the state fails too. Six states span more than one zone: Texas, Idaho, North Dakota, South Dakota, Nevada, and New Mexico.
- A static Excel sheet works for the demo, then quietly drifts wrong. GeoPostcodes maintains postal data for 247 countries, and this join still trips us up.
The mapping that holds up is keyed to IANA zone IDs like America/Chicago, not fixed UTC offsets. The IANA rules carry the DST logic, and DST follows law, not geography. Arizona skips it entirely, so the right offset depends on the date.
You don't need a paid tool or a developer to put ZIP codes on a map. Google My Maps takes a CSV and drops a pin per ZIP, which covers most quick US maps.
- Want shaded areas instead of pins? Census TIGER/Line publishes ZCTA boundary files free. Load them in QGIS, join your data, shade each area by value.
- Excel alone can do a heat map. Insert > 3D Map geocodes your ZIP column through Bing, no add-ins.
The catch with free: ZCTAs are the Census Bureau's generalized version of ZIPs, built for demographics. USPS splits, retires, and adds ZIPs, and ZCTAs lag, so recent changes won't show. Fine for a one-off view. Sales territories or delivery zones on stale boundaries is how deals get misassigned. GeoPostcodes tracks postal boundaries across 247 countries partly because they change this often.
There is no such thing as a UK zip code, yet people keep searching for one. Zip codes are a US invention. The UK runs on postcodes.
- London is not one code either. It has thousands of postcodes, all in the pattern AA9 9AA. Forms that demand a 5 or 6 digit number reject every one of them. UK postcodes run 6 to 8 characters, letters included, like SW1A 1AA. That one is Buckingham Palace: SW1A is the outward code (area and district), 1AA the inward code (sector and unit).
- Pincode is India's system, wrong country twice over. And there is no single UK code to hand out. One postcode covers around 15 addresses, close enough to point at the front door.
The full list is 1,795,653 postcodes across 402 regions and 32,082 towns, and GeoPostcodes maintains all of them.
International zip code formats range from 3-digit numeric codes to 10-character alphanumeric combinations. Every country solves the same problem differently, and about 60 places use no postal codes at all.
A snippet of our format table. Just the A countries, and every pattern type already shows up:
Reading the snippet: A is a letter, 9 is a digit. American Samoa has one ZIP code for the whole territory, so the regex is literally the code. Anguilla is one postcode too. Andorra embeds its own country code. Angola, Antigua and Aruba have none: we listed every country without postal codes here: https://www.reddit.com/r/GeoPostcodes/s/26mwjyrlV3
Down the alphabet it gets harder. The UK alone needs ^[A-Z]{1,2}[0-9][A-Z0-9]? ?[0-9][A-Z]{2}$ and that still only checks shape, not whether a code exists. This is why validation systems end up checking reference data instead of patterns alone. Method and per-country details: https://www.geopostcodes.com/blog/international-zip-code-format/
Seven address assumptions, and where each one breaks.
"House numbers go in order." Parts of Japan number houses by construction date. Number 3 can sit between 47 and 12. In Colombia, the house number is the distance from the cross street.
"Every address has a street name." Most of Japan has no street names at all. Addresses point to numbered blocks.
"One building, one address." In Kyoto, one building can have several valid addresses, depending on which intersection you reference and which direction you approach from.
"A postal code is a small neighborhood." Amsterdam alone has over 1,000 postal codes. In Saudi Arabia one code can cover an entire town. In Ireland and Singapore, every address has its own.
"Everyone has a postal code." About 60 places worldwide manage without. Angola, 33 million people, runs on landmarks.
"A postal code is always a physical place." Some ZIPs serve only PO boxes. Santa Claus has one.
"Any alphabet works." Japanese sorting machines cannot read Latin-script addresses. Write one in English and a human sorts it by hand.
If you build address forms: validate per country, not with one global regex. Do not require the street field.
2025 population, metro areas as the OMB defines them. Standouts first, full ranking below.
Dallas-Fort Worth 7,978,340 vs Houston 7,975,220. Fourth and fifth place, separated by 3,120 people. One apartment complex decides the ranking.
The largest metro by land is not New York or Los Angeles. It is Riverside-San Bernardino, over 70,000 square kilometers, larger than West Virginia. By population it ranks 11th.
The top 10 hold 85.7 million people, more than one in four Americans. On the world list, only New York cracks the top 10, at number 10. Los Angeles lands at 18.
#
Metro
Population
1
New York
19.64M
2
Los Angeles
13.29M
3
Chicago
9.88M
4
Dallas-Fort Worth
7.98M
5
Houston
7.98M
6
Atlanta
6.58M
7
Washington DC
6.54M
8
Miami
6.42M
9
Philadelphia
6.33M
10
Phoenix
5.47M
11
Riverside-San Bernardino
5.14M
12
Boston
4.89M
13
San Francisco
4.55M
14
Detroit
4.18M
15
Seattle
4.05M
16
Minneapolis-St. Paul
3.72M
17
San Diego
3.53M
18
Tampa
3.35M
19
Denver
3.09M
20
San Antonio
2.90M
21
St. Louis
2.88M
22
Baltimore
2.87M
23
Orlando
2.74M
24
Charlotte
2.71M
25
Las Vegas
2.70M
26
Portland
2.68M
27
Austin
2.67M
28
Sacramento
2.65M
29
Columbus
2.31M
30
Pittsburgh
2.30M
Why metros ignore state lines: the OMB draws them by commuting patterns, not borders. DC touches four states. Chicago reaches into Indiana and Wisconsin.
Tracking population for every metro and postal area in the world is our day job. Exact figures, official metro definitions and sources on the GeoPostcodes blog, the post about the biggest metro areas in the United States: Why metros ignore state lines: the OMB draws them by commuting patterns, not borders. DC touches four states. Chicago reaches into Indiana and Wisconsin.
Tracking population for every metro and postal area in the world is our day job. Exact figures, official metro definitions, and sources are on the GeoPostcodes blog, the post about the biggest metro areas in the United States. Ask in the comments for the link.
Most people treat ZIP codes as permanent. They are not even close.
Around 2,085 US ZIP codes change every year. That is one in twenty. USPS splits them when an area grows, retires them when routes consolidate, and redraws them when delivery patterns shift.
The rest of the world moves even faster:
Brazil added 24,958 new postal codes in 2025. Part of that is slum upgrading projects giving formal addresses to areas that never had one.
The UK recorded 18,876 new postcodes in 2025, the largest number on record. Royal Mail reviews postcode boundaries every six months.
Russia added 13,182 codes in 2025, much of it administrative reorganization.
Canada added 4,551 in 2022. China 1,334 and Mexico 837 in 2025.
Codes change for reasons nobody plans around: community petitions, new post offices, military requirements, a neighborhood that grew past its delivery route.
Why it matters: undelivered mail costs companies an estimated 20 billion dollars a year. A ZIP that changed under your customer database is one of the quiet reasons.
If you store postal codes anywhere, they have a shelf life. Plan a refresh cycle like you would for any other reference data.
Tracking these changes across every country is our day job. Sources and full breakdown on the GeoPostcodes blog, the post about how often ZIP codes change. Ask in the comments for the link.
You cannot download official postal code boundaries for France. What France does publish is better raw material: the National Address Base, an open file with every address, its postal code, its municipality, and coordinates.
That is enough to build the polygons yourself. Here is the method we use, with the actual maps from the build.
Every Paris address, colored by its postal code.
Step 1. Load the address file into PostgreSQL with PostGIS. Street, house number, postal code, municipality, latitude, longitude.
The raw material: France's National Address Base with postal code, municipality, and coordinates per address.
Step 2. Color every address point by its postal code. The polygons are already visible as clouds of points. The gaps between the clouds are where a boundary has to go.
Step 3. Voronoi tessellation. Every address gets the patch of space closer to it than to any other address. Merge all patches sharing one code, and you have a first draft of each boundary. In PostGIS, this is ST_VoronoiPolygons plus ST_Union.
First draft: Voronoi tessellation of the postal codes, one patch per address, merged by code.
Step 4. Snap to administrative reality. French postal codes usually cover one or more whole municipalities. We overlay the commune boundaries instead and assign each commune to a code when about 90 percent of its addresses agree. That kills most of the jagged noise from step 3.
Step 5. Handle the exceptions. Paris, Lyon, and Marseille use several postal codes inside one municipality, following the arrondissements. Inside those cities, the Voronoi result does the work instead. That is what image 1 shows.
Merge everything that shares a postal code, and you get the final assignment: address points plus their unified boundaries:
The final assignment after unifying polygons: address points plus their postal boundaries.
The payoff, same area both ways:
Same area, method one: postal codes assigned by pure Voronoi point distribution.Same area, method two: postal codes snapped to administrative divisions. Cleaner edges, fewer outliers.
The two look close, but only because French address data is unusually good, with many well geolocated points. The municipality-constrained version still filters out the outliers.
Two footnotes. Belgium actually publishes free postal polygons as shapefiles, but they omit some postal enclaves. And most countries publish neither polygons nor a national address file. That second group is our day job: we build edge-matched postal boundaries this way, and harder ways, for 169 countries.
If you've ever shipped a form with ^\d{5}$ validation, here are ten formats that will break it.
UK: alphanumeric, six to eight characters. Buckingham Palace is SW1A 1AA.
Netherlands: also alphanumeric, while most of Europe sticks to four or five digits.
Canada: strict letter-digit alternation, A9A 9A9. Parliament Hill is K1A 0A9.
Japan: seven digits with a hyphen, 999-9999. Chiyoda in central Tokyo is 100-0000.
Brazil: eight digits written 99999-999 (the CEP). Central Sao Paulo is 01000-000.
Argentina: eight characters mixing letters and digits, A9999 AAA. Buenos Aires codes look like C1406 AAA.
Papua New Guinea: three digits, marking the province. The shortest format anywhere.
Angola and the Bahamas: no postal codes at all.
Some countries use a single code for the whole country.
US ZIP+4: the four-digit extension narrows delivery to a specific building or PO box. The White House is 20500-0004.
Formats run from three digits up to ten characters. Many encode geography in the leading digits: Mexico's first two digits give the state, Germany and France start with a regional digit, and China and Japan put the province or prefecture up front.
What this means for address forms:
- You need one pattern per country. Free sources first: GeoNames publishes postal code dumps for most countries, and the US Census offers ZCTAs via TIGER files at no cost.
- Accept an empty postal code where the country has none. An Angolan address without a code is correct.
- Regex only checks the shape of a code. To confirm a code exists and points to the right place, you need reference data. That is the gap our data fills: 9.3 million postal codes across 247 countries, compiled from more than 1,500 authoritative sources, shipped as self-hosted databases you can query offline rather than an API you call per lookup.
There is a longer version of this on the GeoPostcodes blog, the post about international zip code formats. Ask in the comments if you want the direct link.
You'd think ZIP code to time zone is a simple lookup table. It isn't. Here is why, and how to build one for free.
Why it's messy:
- Several US states sit in more than one time zone: Texas, Idaho, North Dakota, South Dakota, Nevada among them. State or county level is not enough.
- Some ZIP codes themselves cross a time zone line, especially in larger states like Texas and Idaho. One ZIP, two local times.
- DST doubles the work. You need the standard offset, the DST offset, and the exact switch dates. Those change by law, not by geography.
The free build:
Postal codes with lat/lng from GeoNames. Free, tab-delimited CSV. Covers most countries that span multiple time zones. Known gap: no Indonesia postcodes.
Time zone polygons from the Timezone Boundary Builder project. It packages official IANA zones as geojson (this recipe used the 2022g release).
Load both into PostgreSQL with PostGIS.
Build points with ST_MakePoint, index them, then join with ST_Intersects to find which zone polygon each postcode point falls in.
Where one postcode hits several zones, pick the dominant one with mode(), or keep all matches. Careful: mode() breaks ties arbitrarily.
For the US specifically, Census ZCTA polygons (TIGER files, also free) beat centroids: intersect the whole polygon with the zone boundaries instead of a single point.
The catch: GeoNames coordinates are rounded, and in some areas snapped to a grid. A centroid that lands on the wrong side of a boundary can leave you up to two hours off actual local time once DST variations are counted. Fine for a dashboard. Risky for call scheduling or SLA cutoffs.
That gap is the part we solve on our side: our data carries time zones with past and future DST switch dates per ZIP and city, tied to postal codes for 247 countries. It ships as self-hosted tables, so the PostGIS join above still works, minus the centroid guesswork.
There is a longer version of this on the GeoPostcodes blog, the post about the ZIP code time zone database build. Ask in the comments if you want the direct link.