Postal Code Formats Around the World, Explained

How postal codes work worldwide: all-digit ZIPs and PINs, alphanumeric UK and Canadian codes, per-address Eircodes — and how to validate each format.

By FakeName Editorial TeamPublished July 13, 2026Last updated July 13, 20269 min read

Every address form eventually meets a postal code it did not expect: letters where digits should be, four characters instead of five, a space in the middle, or no code at all. Postal codes are one of the least standardized pieces of address data on the planet — each country invented its own scheme, on its own timeline, for its own sorting machines. This guide tours the major formats, what their characters actually encode, and what that means for anyone validating addresses or generating realistic test addresses.

What a postal code actually encodes

Whatever the format, nearly every system shares one design: the code reads left to right, from coarse to fine. The first character or two selects a broad region — a numbering zone, a province, a postcode area — and each following character narrows toward a sorting office and finally a delivery area. The Universal Postal Union, whose 192 member countries carry international mail, promotes exactly this kind of structured addressing because a machine can route an envelope most of the way to its destination on the code alone [upu]. The differences are in the alphabet each country chose — digits only, or letters too — and in how fine the last characters resolve.

CountryLocal nameFormatExampleLeading part encodes
United StatesZIP CodeNNNNN (+4 optional)90210National zone 0–9, east to west [zip-wiki]
United KingdomPostcode1–2 letters + digit(s), space, N + 2 lettersEC1A 1BBPostcode area (about 120) [uk-postcodes]
CanadaPostal codeANA NANK1A 0B1Province/region letter [ca-postal]
GermanyPLZNNNNN10115Leitzone (broad region)
FranceCode postalNNNNN75001Département (first two digits)
JapanYūbin bangōNNN-NNNN100-0001Prefecture-level area
IndiaPIN codeNNNNNN110001One of nine postal zones
BrazilCEPNNNNN-NNN01310-100Macro-region
AustraliaPostcodeNNNN2000State or territory
NetherlandsPostcodeNNNN AA1012 ABCity and district digits [nl-postal]
SpainCódigo postalNNNNN28001Province (first two digits)
IrelandEircodeRouting key + unique IDA65 F4E2Post town routing area [eircode]
Postal code formats of selected countries (N = digit, A = letter).

The all-digit family: ZIP, PLZ, PIN and friends

Digit-only systems are the most common worldwide, and the US ZIP Code is the archetype: five digits introduced in 1963 under the Zone Improvement Plan, with the first digit sweeping 0–9 roughly east to west — 0 for New England, 9 for the Pacific states — then narrowing through a sectional center to a delivery post office [zip-wiki]. The optional +4 extension resolves to a block face or large building. We cover the American system digit by digit in what a ZIP code means and its role in a full address in the US address format guide.

  • Germany switched to five-digit PLZ codes in 1993, merging West and East Germany's incompatible four-digit systems after reunification — one of the largest renumberings ever executed.
  • France encodes the département in the first two digits: 75 is Paris, 13 is Bouches-du-Rhône, 06 is Alpes-Maritimes.
  • India rolled out six-digit PIN codes in 1972; the first digit selects one of nine zones, including a dedicated 9 for Army Post Offices.
  • Japan upgraded to seven digits (NNN-NNNN) in 1998, precise enough to identify a city block.
  • Brazil's eight-digit CEP appends a three-digit suffix that can single out one side of a long street.

The alphanumeric family: more addresses per character

Letters multiply capacity: a position that accepts 26 letters instead of 10 digits packs far more combinations into the same length, which is how six or seven characters can pinpoint a handful of houses. The United Kingdom's system — rolled out nationally between 1959 and 1974 — is the classic example, with around 1.8 million live postcodes in structures like SW1A 2AA or M1 1AE [uk-postcodes]. Every UK postcode splits into an outward code that routes mail to the right district and an inward code that walks it to a street segment:

PieceValueNameWhat it selects
AreaECPostcode areaOne of ~120 letter codes (EC = London East Central)
District1APostcode districtA sorting district within the area
Sector1Postcode sectorA neighborhood-scale slice of the district
UnitBBPostcode unitA street segment or small group of addresses [uk-postcodes]
Anatomy of the UK postcode EC1A 1BB.

Canada interleaves the two alphabets — letter, digit, letter, space, digit, letter, digit, as in K1A 0B1. The first three characters form the Forward Sortation Area (the first letter mapping to a province or region), and the last three the Local Delivery Unit. To keep codes legible, Canada Post never uses the letters D, F, I, O, Q or U, which are too easily misread by machines and humans alike [ca-postal]. The Netherlands takes a hybrid route: four digits then two letters (1012 AB), with a short list of letter pairs deliberately never issued [nl-postal].

The precision spectrum: from region to front door

How much does a code tell you? It depends enormously on the system. A five-digit US ZIP averages thousands of delivery points; a full UK postcode unit covers roughly fifteen; and the newest systems go all the way to one. Ireland skipped straight to the endpoint when it introduced Eircode in 2015: a three-character routing key (A65 for Wexford town, for example) plus a four-character unique identifier gives every delivery point in the country its own code — two neighboring houses have different Eircodes [eircode]. Singapore's six digits similarly identify a single building. For anyone modeling address data, this matters: in some countries a postal code is a region attribute, in others it is effectively a primary key.

Places with no postal code at all

Plenty of mail arrives every day with no code whatsoever. Hong Kong and Macau run their postal systems entirely without one, and dozens of smaller territories — across the Caribbean and the Pacific in particular — rely on town names and PO boxes [list-postal]. Ireland itself managed without codes until 2015. The practical lesson for anyone building forms: a mandatory postal-code field makes it literally impossible for some customers to enter their real address correctly.

Generating format-valid international addresses

Test data has to respect all of this variety, or forms and pipelines pass tests they should fail. A believable generated address pairs a real city with a postal code that is structurally valid for that exact place — a London address with a plausible EC1-style postcode, a Toronto one with an M-prefixed postal code, a Berlin one with a 1xxxx PLZ. That is how our city pages work: London, Toronto, Paris, Berlin and Sydney each generate addresses whose codes match the city's real format, with the street and house number randomized so they resolve to no real residence. For the full picture per country, start at the address generator or browse all supported countries.

The bottom line

Postal codes all answer the same question — where should this go? — with alphabets and precision levels that reflect each country's history: America's coast-to-coast digits, Britain's dense letter grid, Germany's reunification renumbering, Ireland's leap to one code per front door. Read the leading characters and you know the region; count the characters and you know the era and the ambition. Respect the differences in your forms and your fixtures, and addresses from anywhere will fit.

References & sources

  1. Addressing solutionsUniversal Postal Union
  2. ZIP CodeWikipedia
  3. Postcodes in the United KingdomWikipedia
  4. Postal codes in CanadaWikipedia
  5. Postal codes in the NetherlandsWikipedia
  6. Eircode — Ireland's postcode systemEircode
  7. List of postal codesWikipedia

Frequently asked questions

Is a ZIP code the same thing as a postal code?+

A ZIP code is simply the United States' name for its postal code — ZIP stands for Zone Improvement Plan, introduced by USPS in 1963. Every ZIP code is a postal code, but 'postal code' is the international umbrella term covering the UK's postcodes, Canada's postal codes, Germany's PLZ, India's PIN and so on.

Why do British and Canadian codes contain letters?+

Capacity and precision. Each alphanumeric position can hold letters as well as digits, so a six-character UK or Canadian code can address far more distinct combinations than six digits could. That lets the code resolve much finer targets — a UK unit covers roughly one street segment or a handful of houses, and a Canadian local delivery unit is similarly small — without becoming very long.

Do all countries have postal codes?+

No. Hong Kong and Macau famously operate without them, Ireland only introduced Eircode in 2015, and dozens of smaller territories rely on town names or PO boxes alone. This is why international address forms should never make the postal-code field mandatory for every country — a hard-required field makes a correct address impossible to enter.

Which postal codes identify a single address?+

Ireland's Eircode is the clearest case: its three-character routing key plus four-character unique identifier resolve to exactly one delivery point. Singapore's six-digit codes identify a single building, and a full UK postcode typically covers only a handful of neighboring addresses. At the other extreme, a US five-digit ZIP can cover tens of thousands of addresses — ZIP+4 narrows it to a block face or building.

How should a form validate international postal codes?+

Validate per selected country, not with one global rule. Store codes as text so leading zeros survive (New Jersey's 07030 must not become 7030), allow letters and spaces where the country uses them, uppercase on normalization, and make the field optional for countries without codes. A per-country regex table plus a text column beats any clever universal pattern.

We use cookies for analytics and ads to keep this generator free. See our Privacy Policy.