GeoPostcodes

Spain ZIP Code Dataset

Comprehensive Spain ZIP code data with accurate geographic coordinates, administrative divisions, and time zone

  • Gartner
  • DB Schenker
  • Randstad
  • Amazon
  • IBM
  • MSC

Sample Dataset Spain

ISOCountryLanguageRegion 1Region 2Region 3Region 4LocalityZip CodeLatitudeLongitudeTimezone
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridLas Higueras40.525283-3.697397Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridEl Cañaveral40.403541-3.573568Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridEl Pardo40.517353-3.780399Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridLos Claveles40.359476-3.785965Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridPalacio de La Real Quinta40.508513-3.732791Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridCañada Real de La Galiana40.351965-3.571238Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridCañada Real de La Galiana40.351965-3.571238Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridCañada Real de La Galiana Sur40.354956-3.566888Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridLa Bulera40.329412-3.661644Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.424807-3.683265Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.445238-3.673484Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.442915-3.705601Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.424540-3.698935Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.405718-3.712925Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.435543-3.681977Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.407951-3.671721Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.427970-3.724766Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.418167-3.678996Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.431905-3.697098Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.423437-3.754271Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.408587-3.698235Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.419058-3.708390Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.412470-3.693667Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.430292-3.710497Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.461272-3.672965Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.426014-3.644855Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.384658-3.651653Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.394915-3.721701Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.456393-3.696696Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.425020-3.683304Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.433864-3.595996Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.425020-3.683304Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.425020-3.683304Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.383449-3.732632Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.383758-3.703470Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.440394-3.643621Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.431689-3.666429Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.474664-3.701661Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.403601-3.639201Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.379223-3.603561Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.410834-3.602664Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.472157-3.635228Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.495918-3.698312Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.477665-3.734820Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.465949-3.683883Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.430336-3.622337Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.394934-3.652992Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.459232-3.709506Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.447221-3.737629Europe/Madrid
ESEspañaESComunidad de MadridMadridArea MetropolitanaMadridMadrid40.366209-3.698239Europe/Madrid

Explore Our Spain ZIP code coverage

The map shows our Spain postal code coverage with major cities and postal code distribution.

Spain
Spain

Loading country data...

Spain's Postal Code Format

Spain utilizes a five-digit numeric postal code system, locally known as Código postal, with a format of 99999. The first two digits of the Código postal identify the province, and the last three digits specify the postal distribution unit. This system covers the mainland, islands, and autonomous cities.

According to the GeoPostcodes world postal code database, Spain has 10,818 postal codes, 8,681 regions, and 73,291 towns. Similar to US ZIP codes, Spain's postal codes are entirely numeric, but they differ in length as US ZIP codes are five-digit numeric with an optional four-digit extension, whereas Spanish postal codes are strictly five-digit numeric.

  • Postal Code Format: 99999

    • Five-digit numeric format (no letters)
    • First two digits = province; last three = postal distribution unit
    • System covers mainland, islands, and autonomous cities (Ceuta & Melilla)
    • 10,818 postal codes covering 8,681 regions and 73,291 towns

    Examples:

    • 28001 - Madrid (Comunidad de Madrid)
    • 08001 - Barcelona (Cataluña)
    • 41001 - Sevilla (Andalucía)
    • 15001 - A Coruña (Galicia)
  • Structure of Postal Codes

    • Format: 5-digit numeric (e.g., 28001).
    • Hierarchical levels: First two digits = province (ordered alphabetically when created); last three = distribution unit for postal routing.
    • Key challenges: Multilingual naming (Spanish, Catalan, Basque, Galician, Occitan) can cause mismatches.
  • Management & Authority

    • Primary postal authority: Correos (Spain’s public operator). Co-manages Andorra’s system with La Poste (France).
    • Update frequency: Postal codes refreshed annually by Correos; national address dataset updated quarterly by the national geographic institute (Cartociudad).
  • Addressing Standards

    • Common address format: Street name + house number, Código Postal, municipality; province name often added though implied by the code.
    • Administrative divisions used: Autonomous communities/cities (level 1), provinces (level 2), comarcas in some regions (level 3), municipalities (level 4).
    • Languages: Addresses may appear in Spanish, Catalan, Basque, Galician, or Occitan; no mandatory language for addressing.
  • Special Characteristics

    • Postal coverage includes Canary Islands, Balearic Islands, Ceuta, and Melilla.
    • Disputed territories (e.g., Olivenza with Portugal; Ceuta and Melilla with Morocco) are fully covered by Correos.
    • Street name duplication is rare compared to other Spanish-speaking countries, improving address clarity.

Our location dataset for Spain

Explore our comprehensive collection of Spain location data products, designed to meet all your mapping and location intelligence needs.

Spain ZIP & Administrative boundaries

Spain administrative landscape often follows inconsistent regional models and irregular public sources, making it difficult to maintain reliable boundaries. Our standardized postal and administrative boundary data resolves these gaps to ensure complete, coherent geographic coverage.

Spain Shapefiles

Coverage Statistics

10,818
Total ZIP Codes
8,681
Provinces & Territories
73,291
Cities & Towns

Available File Formats

Choose from multiple data formats to seamlessly integrate Spain postal code data into your systems

  • CSV FormatComma-separated values for spreadsheet applications and data analysis tools
  • GeoJSON FormatJavaScript Object Notation for web applications and modern development
  • GML FormatExtensible Markup Language for enterprise systems and legacy applications
  • DAT FormatDatabase-ready SQL scripts for direct import into your systems

Data Dictionary

Comprehensive field definitions and data specifications for the Spain postal code dataset

Field nameField typeDescriptionComments
ISOChar(2)ISO 3166-1 Country codeThe ISO 3166-1 standard is published by the International Organization for Standardization (ISO) and defines a unique code for the name of each country. The country codes are represented as a two-letter code (alpha-2).
CountryChar(50)Country name
LanguageChar(2)Language codeWhen there are several official languages in the country, or for countries using a non-Latin alphabet, we provide the names in different languages. The language field contains the language code and allows you to select a specific version.
Region1Region2Region3Region4Char(80)Administrative division level 1Administrative division level 2Administrative division level 3Administrative division level 4These fields contain the name of administrative divisions for each available level. If not applicable, the value '-' will be indicated.
LocalityChar(80)Locality nameContains the settlement name. The type of settlement may vary depending on the country (city, town, village, etc..).
PostcodeChar(15)ZIP / Postal codeIn countries/places where there is no postal code in use, this field is left empty. The postcode structure varies for each country.
LatitudeLongitudeDoublePlace coordinates (WGS84 coordinates)These fields contain the geographic coordinates related to the specific locality and postal code of the record. The geographical position is usually precise to about one hundred meters and corresponds to the center of the locality. All our files are created using the World Geodetic System standard WGS 84. The corresponding SRID reference is EPSG:4326.
TimezoneChar(30)Time zone name (Olson)Following the timezones defined in the IANA tz database (sometimes called Olson database).

Why choose GeoPostcodes

Global coverage

Complete coverage across 247 countries, including hard-to-source geographies like China, Japan, Brazil, and Russia.

Highest quality

Built on extensive, authoritative sourcing with robust data engineering and quality control. Standardized and up-to-date.

Expert Consulting

With 15 years of experience, we guide your implementation and deliver data in the format that fits your system.

Discover more advantages

Global Location Databases

Comprehensive location data products serving businesses, and organizations worldwide with accurate, up-to-date geographic information.

Postal Code Database

Global dataset containing all administrative divisions, cities and ZIP codes.

Explore postal code database

Key features

  • 247 Countries
  • 9,9M Coordinates
  • 9,3M ZIP codes
  • 400 Time zones
  • 4M Cities and Towns
  • 116K UNLOCODES

Specifications

  • Coverage: Global
  • Format: CSV, ASC, DAT, GML, GeoJSON, KML, Shapefile (SHP)

Use cases for the international ZIP code database

Powering enterprise solutions and product innovation for businesses worldwide

Address Validation

Capture accurate addresses for every country and territory in the world, in any language, and match local requirements.

Reporting and business intelligence

Ensure compliant and accurate reports across your organization. Enhance data analysis with location intelligence.

Logistics and shipping

Design and optimize your distribution network, plan your pick-up and drop-off locations, reduce costs and improve visibility over your shipping.

Map and visualization

Analyze complex trends and discover actionable insights. Build engaging and intuitive map-based data visualizations.

Master data management

Rely on a single source of truth to ensure accuracy, consistency, and timeliness across your systems and organization.

Sales and marketing

Segment customers for site selection, analytics, geofencing, campaigns, mapping, and targeted ads.

Discover more advantages

Ready to Get Started?

Download our sample Spain postal code dataset.

Frequently Asked Questions

What is the ZIP code of Madrid?

The ZIP codes (Código postal) for Madrid range from 28001 to 28760; the central Sol area uses 28013.

What is a 5-digit ZIP code in Spain?

A 5-digit ZIP code in Spain is the Código postal and uses the format 99999: five digits where the first two identify the province (01–52) and the remaining three specify the delivery area or post office.

Are there ZIP codes in Spain?

Yes. Spain uses postal codes (Código postal) consisting of five digits (format 99999), assigned to municipalities and postal zones across the country.

Does Spain have postal codes?

Yes. Spain uses postal codes (Código postal) made of five digits (format 99999), assigned to municipalities and areas to route mail across the country, covering its 73,291 localities.

Which town has the ZIP code 12345 in Spain?

There is no town in Spain with the postcode 12345.

Does Spain use ZIP codes like the United States?

Yes. Spain uses postal codes (Código postal) consisting of five digits (format 99999); they serve the same purpose as US ZIP codes to sort and route mail across municipalities and neighborhoods.

Does Spain have a ZIP code system?

Yes. Spain uses a postal code system (Código postal) consisting of five digits in the format 99999, applied nationwide to identify provinces and localities.

Which country code is mistaken for ZIP code in Spain?

The country code “ES” (ISO 3166-1 alpha-2 for Spain) is sometimes mistakenly used as a ZIP code; Spain’s actual código postal format is five digits (99999).

How to write an address in Spain?

Recipient’s name
Business or department name (if applicable)
Street name and House number
Postal Code (5 digits) and City Name
Province (optional)
Country – SPAIN (in all caps)

Example:

John Smith
C. Sebastián Trujillo 29
41005 Sevilla
SPAIN

What is the ZIP code of Spain?

The ZIP code format for Spain is five digits (Código postal: 99999); for example, 28001 is central Madrid.

What is the postal code format in Spain?

The postal code format in Spain is five numeric digits (e.g., 99999); the postal code is referred to as “Código postal”.

How many digits is a ZIP code in Spain?

A ZIP code in Spain consists of five digits (format 99999); in Spanish it is called código postal.

Do addresses in Spain include ZIP codes?

Yes. Addresses in Spain include a Código postal (ZIP code) of five digits (format 99999). It is used to ensure correct delivery and is usually placed before the locality, e.g. Calle Mayor 1, 28013 Madrid.

Where is ZIP code 28001 in Spain?

ZIP code 28001 in Spain corresponds to Madrid. Código postal 28001 covers the Salamanca district (Recoletos/Serrano), an upscale central area of the city.

Updated: October 1, 2026