Spain postal codes
Spain has 11,221 postal codes covering 36,683 cities, towns and places in this directory. Postal codes in Spain have 5 digits (for example 28001). Pick a place below to see its postal code, or enter a code in the search box to find the locality it belongs to.
The places are organised by provinces: Spain has 52 provinces, listed below with the number of places in each.
For larger cities the directory also includes street-level postal codes.
Provinces (52)
How postal codes work in Spain
Spain uses five-digit postal codes (código postal, CP), in general use since 1 July 1984 and managed by Correos.
What the digits mean
- Digits 1–2 – the province, numbered 01 to 52. The numbers follow the alphabetical order of the provinces at the time: 01 Álava, 08 Barcelona, 28 Madrid, 41 Seville, 46 Valencia, 50 Zaragoza. Ceuta (51) and Melilla (52) received their own prefixes in 1995.
- Digit 3 – the main city or route inside the province. A zero stands for the provincial capital, so every code starting with 280 is in the city of Madrid and every code starting with 080 in the city of Barcelona.
- Digits 4–5 – the delivery district or route.
Capitals and small towns
Provincial capitals and other large cities are split into many codes, assigned street by street and sometimes by house-number range. A small municipality usually has a single code, which it can share with neighbouring villages. This directory lists the codes by province and, for the cities that have them, by street.
Writing a Spanish address
Street type and name, house number and, where needed, floor and door on the first line; then the postal code and the town; then the province if it differs from the town. Example: Calle Mayor 1, 28013 Madrid.
Frequently asked questions
What format do postal codes in Spain have?
Postal codes in Spain have 5 digits (for example 28001).
How many postal codes does Spain have?
This directory lists 11,221 postal codes for 36,683 places in Spain.
Data updated: 2026-11.