Map a list of Spanish municipalities
Paste a list of municipalities in Spain, by name or INE code, and see them on the map as points, as a heat map or with each municipality shaded. Names that could be more than one place are flagged so you can pick.
One per line: the name or the INE code. If several municipalities share a name, add the province (“Mieres, Girona”). You can add a value after a semicolon (“Toledo; 12”).
Excel, CSV or TXT: its rows are pasted into the box.
Example A list with names, INE codes, a typo and a name shared by several municipalities. Paste your own.
Loading the map…
Keep going with your municipalities
More tools with Spain’s municipalities.
Download
Your list is matched in your browser against INE and IGN data and isn’t sent to any server.
How to use it
-
Paste your list
One municipality per line, by name or by its five-digit INE code. You can copy a column from Excel or open the file. To weigh them differently, add a number after each one: customers, sales, visits.
-
Check the doubtful ones
If several municipalities share a name (there are two Arroyomolinos, two Mieres, two Torrent…) or a name has a typo, it shows up under “To check” with a drop-down to pick the right one.
-
Pick a view
Points (bigger the more they weigh), heat map (where they cluster) or areas (each municipality shaded). Download the map as a PNG or the list with INE codes, provinces, coordinates and population as a CSV.
What people use it for
-
Customers in Spain
The towns your customers or orders come from, with a count for each, to see at a glance where you sell and where you don’t.
-
Sales and service areas
The municipalities a sales rep, a branch or a technician covers, shaded as areas for a meeting or a website.
-
Research and fieldwork
The municipalities in a survey, a study area or a list from an official spreadsheet, checked against the official names and codes.
-
Trips and challenges
The towns you’ve visited, the ones left in a valley or the stops on the Camino de Santiago.
Where the data comes from
The 8,132 municipalities, their official names, codes and population come from the municipal register (Padrón) as of January 1, 2025, published by the INE (Instituto Nacional de Estadística, Spain’s national statistics office). Each municipality’s point is its main town, and its shape is its boundary from the IGN (Instituto Geográfico Nacional, the national mapping agency).
Names are matched ignoring accents and capitals, with the article at the front or the end (“La Acebeda” or “Acebeda, La”), in any of their official names (“Alicante” or “Alacant”, since many places in Catalonia, Valencia, the Balearic Islands, the Basque Country and Galicia have a name in Spanish and one in the local language), with common Spanish forms (“Lérida”, “Gerona”, “Orense”) and with small typos. INE codes work with five digits, with four (if Excel dropped the leading zero) or with six (with the check digit).
On the heat map and the points, each municipality weighs the sum of its values; without values, the number of times it appears in the list. In area view, colors are five classes with roughly the same number of municipalities each.
Municipalities, towns and postal codes
A municipality (municipio) is the area governed by one town council. Spain is completely divided into them, from big cities to villages of a few dozen people, so every address belongs to one. Many municipalities include several villages or hamlets: those aren’t on the INE list, so write the municipality they belong to, which is usually named after its main town.
Every municipality has a five-digit INE code: two digits for its province and three for the municipality (28079 is Madrid, 08019 Barcelona). Spanish postal codes aren’t open data, so the tool can’t use them. Ceuta and Melilla are included; areas with no municipality (such as the Chafarinas Islands) aren’t.
Frequently asked questions
What happens if two municipalities have the same name?
The most populous one goes on the map and the line shows up under “To check” with every municipality of that name, so you can pick. To avoid it, add the province after the name: “Mieres, Girona” or “Arroyomolinos (Cáceres)”.
Can I use INE codes?
Yes, and it’s the safest way: the five-digit code (28079 is Madrid). If Excel dropped the leading zero (8019 instead of 08019), that works too.
What’s the number after each name?
An optional value that weighs each municipality: orders, customers, euros. If a municipality appears more than once, the values add up. Without values, each line counts as one.
How many municipalities can I map?
Up to 5,000 lines. Areas are drawn with the detailed IGN boundaries if the municipalities fall in three provinces or fewer, and with lighter ones if they’re spread across Spain.
Is my list sent anywhere?
No. It’s matched in your browser against INE and IGN data, which the page downloads like any other file.
Why isn’t a town found?
Because no municipality has that name or a similar one: it may be a village that belongs to a larger municipality, a neighborhood or a name that has changed. Under “Not found” you’ll see suggestions of names that start the same way.
Related tools
All toolsSources
- Municipal register (Padrón) as of January 1, 2025 · INE, official population figures
- Municipal boundaries · Instituto Geográfico Nacional (CC BY 4.0)
- Gazetteer of municipalities and population centers · IGN, each municipality’s point
- OpenFreeMap · base map with OpenStreetMap data