Spain postal code lookup
Type a street address in Spain, or use your location, and we’ll give you its postal code (código postal) along with the town, municipality and province.
Search for an address
Postal code · example
Looking it up…
Other ways to pick the spot
Or tap anywhere on the map.
Loading the map…
How Spanish postal codes work
Spain’s postal code, the código postal, is a five-digit number like a US ZIP code. The first two digits are the province, numbered in the alphabetical order of their old Spanish names: 01 Álava, 02 Albacete, 03 Alicante, and so on up to 50 Zaragoza, followed by 51 Ceuta and 52 Melilla. A 0 in third place usually means the provincial capital, and the last two digits mark the delivery district or route.
Those first two digits are also the province code used by Spain’s National Statistics Institute (INE), so 28 means Madrid and 08 Barcelona whether you’re reading a postal code or an official municipality code.
| Address | Postal code | What it tells you |
|---|---|---|
| Plaza Mayor 1, Burgos | 09003 | Province 09 (Burgos), capital city |
| Plaza Nueva 1, Seville | 41001 | Province 41 (Seville), capital city |
| Plaza de la Constitución 1, Dos Hermanas | 41701 | Province 41, a town outside the capital |
| Calle Ciutat 2, Barcelona | 08002 | Province 08 (Barcelona), capital city |
| Plaça de l’Església 1, El Prat de Llobregat | 08820 | Province 08, outside the capital |
| Calle Méndez Núñez 13, Santa Cruz de Tenerife | 38003 | Province 38, Canary Islands |
| Calle Isabel Cabral 1, Ceuta | 51001 | Autonomous city of Ceuta |
Street doors looked up in CartoCiudad on October 31, 2026.
Where the code comes from
From CartoCiudad, the official address database of Spain’s National Geographic Institute (IGN), which lists every street door (portal) in the country with its postal code. Search for an address and you get that door’s code. Tap the map or use your location and you get the code of the nearest door, as long as it’s within 300 meters (about 1,000 feet) and in the same municipality as you. Out in the countryside, with no building nearby, we’d rather give you no code than a wrong one.
Correos, the Spanish postal service, doesn’t publish postal code boundaries as open data, so we can’t draw them. The outline on the map is the municipality, the area run by one town hall.
One square, three postal codes
The example on the map is right next to Madrid’s Puerta del Sol, the square at the center of the city. It shows why you should always search with the house number:
| Address | Postal code |
|---|---|
| Puerta del Sol 1, Madrid | 28014 |
| Puerta del Sol 1 B, Madrid | 28013 |
| Puerta del Sol 2, Madrid | 28012 |
| Calle de Alcalá 501, Madrid | 28027 |
| Calle de Alcalá 502, Madrid | 28037 |
Looked up in CartoCiudad on October 31, 2026.
The buildings around Puerta del Sol use three different codes. On Calle de Alcalá, odd numbers in the 500s use 28027 and most even ones 28037, so numbers 501 and 502, across the street from each other and 76 meters (250 feet) apart, have different postal codes.
When the code doesn’t match the map
A Spanish postal code almost always stays within one province, but it doesn’t line up with municipalities:
- Many villages, one code: 42180 serves at least seven small municipalities in the province of Soria.
- One code, two municipalities: the resort of La Manga del Mar Menor uses 30380 in both the Cartagena and the San Javier parts.
- Another province’s code: Bajauri, a village in the Condado de Treviño (province of Burgos), uses 01118, which starts with Álava’s 01 because Álava surrounds the enclave.
So the postal code won’t tell you which town hall an address belongs to. For that, use “Spanish municipality from an address”.
Shipping to the Canary Islands, Ceuta and Melilla
Postal codes starting with 35 and 38 are in the Canary Islands, and 51 and 52 are Ceuta and Melilla, the two Spanish cities on the North African coast. All three are outside the European Union’s VAT area: the Canaries have their own sales tax (IGIC) and Ceuta and Melilla another (IPSI). Parcels sent there from mainland Spain or the rest of the EU may need a customs declaration, and many online shops charge extra or don’t ship there at all, so check the code before you order.
Frequently asked questions
Is a Spanish postal code the same as a ZIP code?
It works the same way: five digits that route the mail. But the first two digits always identify the province, and the codes are run by Correos, the Spanish postal service.
How do I write a Spanish address on a parcel?
Name; street type, street name and number, plus floor and door if any (“Calle Mayor 10, 2.º B”); then postal code and town (“28013 Madrid”); and the province if the town is small. Add “Spain” or “España” when sending from abroad.
Why do two buildings on the same street have different codes?
Because codes are assigned door by door. On long streets and on streets that mark a district line, each side or each stretch can have its own code.
Why don’t you show postal code boundaries on the map?
Correos doesn’t publish them as open data. We give you the code of each address and draw the municipality instead.
Why is there no postal code when I use my location in the countryside?
The nearest street door is more than 300 meters away or in another municipality, and we’d rather not guess.
Does it work outside Spain?
You’ll get the postal code of the nearest address from OpenStreetMap, which is incomplete in many countries. For US ZIP codes, use “What is my ZIP code?”.
Do you store what I search?
No. Searches go to CartoCiudad or Photon and aren’t saved.
Related tools
All toolsSources
- CartoCiudad: Spanish addresses and postal codes · Instituto Geográfico Nacional, CC BY 4.0 ign.es
- Spain’s municipal, provincial and regional boundaries (BDDAE, simplified) · Instituto Geográfico Nacional, CC BY 4.0 ign.es
- Addresses and places worldwide (Photon) · © OpenStreetMap contributors, ODbL
- Base map · OpenFreeMap, © OpenStreetMap contributors