Every developer who has built an address form for European customers eventually discovers the truth: there is no European postal code format. Each country has its own, and the variations are genuinely meaningful. This page is a country-by-country reference covering the EU-27 plus key non-EU European countries, with the regex patterns and validation tips you need in production.
The High-Level Pattern
European postal codes split into roughly four groups:
- 5-digit numeric: Germany, France, Italy, Spain, Finland, Croatia, Estonia, Greece, Lithuania, Slovakia.
- 4-digit numeric: Belgium, Bulgaria, Hungary, Austria, Switzerland, Liechtenstein, Luxembourg, Norway, Slovenia, Denmark.
- Alphanumeric, fixed format: Netherlands (4 digits plus 2 letters), Ireland (Eircode, 7 alphanumeric), Malta (3 letters plus 4 digits).
- Hierarchical alphanumeric: United Kingdom (variable-length, two-part).
Plus a few outliers: Sweden uses 5 digits with a space after the third (123 45), Poland uses 5 digits with a hyphen after the second (00-001), Czechia uses 5 digits with a space after the third (110 00).
The EU-27 Reference
| Country | ISO | Format | Example | Regex |
|---|---|---|---|---|
| Austria | AT | 4 digits | 1010 | ^\d{4}$ |
| Belgium | BE | 4 digits | 1000 | ^\d{4}$ |
| Bulgaria | BG | 4 digits | 1000 | ^\d{4}$ |
| Croatia | HR | 5 digits | 10000 | ^\d{5}$ |
| Cyprus | CY | 4 digits | 1010 | ^\d{4}$ |
| Czechia | CZ | NNN NN | 110 00 | ^\d{3} ?\d{2}$ |
| Denmark | DK | 4 digits | 1050 | ^\d{4}$ |
| Estonia | EE | 5 digits | 10111 | ^\d{5}$ |
| Finland | FI | 5 digits | 00100 | ^\d{5}$ |
| France | FR | 5 digits | 75008 | ^\d{5}$ |
| Germany | DE | 5 digits | 10115 | ^\d{5}$ |
| Greece | GR | NNN NN | 105 63 | ^\d{3} ?\d{2}$ |
| Hungary | HU | 4 digits | 1051 | ^\d{4}$ |
| Ireland | IE | Eircode | D02 X285 | ^[A-Z]\d{2} ?[A-Z0-9]{4}$ |
| Italy | IT | 5 digits | 00184 | ^\d{5}$ |
| Latvia | LV | LV-NNNN | LV-1050 | ^LV-\d{4}$ |
| Lithuania | LT | LT-NNNNN | LT-01100 | ^LT-\d{5}$ |
| Luxembourg | LU | 4 digits | 1234 | ^\d{4}$ |
| Malta | MT | LLL NNNN | VLT 1234 | ^[A-Z]{3} ?\d{4}$ |
| Netherlands | NL | NNNN LL | 1011 AB | ^\d{4} ?[A-Z]{2}$ |
| Poland | PL | NN-NNN | 00-001 | ^\d{2}-\d{3}$ |
| Portugal | PT | NNNN-NNN | 1000-001 | ^\d{4}-\d{3}$ |
| Romania | RO | 6 digits | 010001 | ^\d{6}$ |
| Slovakia | SK | NNN NN | 811 01 | ^\d{3} ?\d{2}$ |
| Slovenia | SI | 4 digits | 1000 | ^\d{4}$ |
| Spain | ES | 5 digits | 28013 | ^\d{5}$ |
| Sweden | SE | NNN NN | 111 22 | ^\d{3} ?\d{2}$ |
Key Non-EU European Countries
| Country | ISO | Format | Example | Regex |
|---|---|---|---|---|
| United Kingdom | GB | hierarchical | SW1A 1AA | ^[A-Z]{1,2}\d[A-Z\d]? ?\d[A-Z]{2}$ |
| Switzerland | CH | 4 digits | 8001 | ^\d{4}$ |
| Norway | NO | 4 digits | 0150 | ^\d{4}$ |
| Iceland | IS | 3 digits | 101 | ^\d{3}$ |
| Liechtenstein | LI | 4 digits | 9490 | ^\d{4}$ |
The UK Postcode in Detail
The UK system is the most information-dense in Europe. A code like SW1A 1AA decomposes into:
SW: postal area (London South West)SW1A: postal district (St James's and Pimlico)SW1A 1: postal sector (a few streets)SW1A 1AA: postal unit (specific delivery point, often one building)
This hierarchy means a UK postcode can identify a building, which is why UK products often use postcode as a proxy for neighbourhood-level or even street-level grouping. Almost no other country's postal code system does this.
Production Validation Patterns
The cheapest production approach is a per-country regex table like the one above, applied based on a country code from the address. The country code can come from:
- An explicit dropdown the user selected
- The user's IP geolocation
- The geocoder result (most production geocoders normalise the postal code and include the country code in the response)
Avoid trying to validate a postal code without knowing the country. A 4-digit code is valid in 12 countries and invalid in many more.
For high-stakes flows (checkout, KYC, regulated industries), don't stop at regex. Send the address to a geocoder and treat a "rooftop" or "street" precision response as the validation, not the regex match alone. A correctly formatted postal code can still fail to match a real address.
Storage and Normalisation
Store postal codes as strings, not numbers. Leading zeros matter (01100 is a valid Lithuanian code; 1100 is not). Storage format conventions:
- Strip non-alphanumeric characters when comparing across data sets.
- Display in the country-canonical form (with hyphens, spaces, prefixes) on output.
- Always store the country code alongside the postal code, even if your product only operates in one country today. The schema scales to multi-country expansion without migration.
How MapAtlas Helps
The MapAtlas Geocoding API returns a normalised address_components.postal_code field for every supported country, validated against the source data. The Search API accepts a postal code as a search input and returns the matching place. Both APIs are EU-hosted, GDPR-compliant, and built on OSM-grade data with explicit per-country address parsers.
For a deeper look at how addresses become coordinates, see What Is a Geocode. For the longitude and latitude mechanics behind every coordinate response, see Longitude vs Latitude.
Frequently Asked Questions
What is the format of European postal codes?
There is no single European postal code format. Each country defines its own. Most use a fixed-length numeric code (5 digits in Germany, France, Italy, Spain; 4 digits in Belgium, Hungary, Austria, Switzerland), but several use alphanumeric codes (Netherlands uses 4 digits plus 2 letters, the United Kingdom uses a complex two-part alphanumeric system, Ireland uses Eircode with 7 alphanumeric characters). A working address validator must hold a per-country pattern for the EU-27 plus key non-EU European countries.
Is a German postal code (Postleitzahl) the same as a Polish postal code?
Both are five characters but the structure differs. Germany uses 5 contiguous digits (e.g. 10115). Poland uses 2 digits, a hyphen, then 3 digits (e.g. 00-001). For storage, you can hold the canonical form with the hyphen for Poland and without for Germany. For matching across data sets, normalise by stripping non-alphanumeric characters and re-applying the country-specific format on display.
How do I validate a postal code from any EU country?
First identify the country (from the address, an ISO 3166-1 alpha-2 country code, or the user's geolocation). Then apply that country's regex pattern. Country-aware validation is the standard production pattern, because a single global regex would either reject valid codes or accept clearly invalid ones. The MapAtlas Geocoding API returns a normalised postal code per country in its `address_components`, so you usually let the geocoder do the validation step for you.
Why does the United Kingdom postal code system look so different?
UK postcodes use a hierarchical alphanumeric system that encodes the postal area, district, sector, and unit in two parts (e.g. SW1A 1AA for Buckingham Palace). It carries more spatial information per code than most country systems, which is why UK postcodes are sometimes used as a proxy for neighbourhood or even individual streets. The system was designed in the 1950s and 1960s and has been retrofitted into modern data infrastructure ever since.

