What municipality am I in?
Tap the button to see which municipality of Spain you’re standing in, plus its province and autonomous community, with the municipal boundary drawn on the map.
Municipality · example
Looking it up…
Other ways to pick the spot
Or tap anywhere on the map.
Loading the map…
How Spain is divided
Spain has three levels of local geography. At the top are 17 autonomous communities (comunidades autónomas), regions with their own parliament such as Andalusia, Catalonia or Madrid, plus the autonomous cities of Ceuta and Melilla. Below them come 50 provinces, and below those, 8,132 municipalities (municipios).
A municipality is the basic unit of local government: each one has a town hall (ayuntamiento) and a mayor (alcalde), and it covers a fixed area of land called its término municipal. Unlike in the US, there’s no unincorporated land: almost every square foot of Spain belongs to some municipality. A single municipality often includes several villages, hamlets or housing developments, so the town name on a sign isn’t always the municipality you’re in.
Well-known places and their municipality
We ran these through the tool itself. Several aren’t where you’d guess from their name.
| Place | Municipality | Province | Autonomous community | INE code |
|---|---|---|---|---|
| Barcelona–El Prat Airport | El Prat de Llobregat | Barcelona | Catalonia | 08169 |
| Madrid–Barajas Airport | Madrid | Madrid | Community of Madrid | 28079 |
| Tenerife South Airport | Granadilla de Abona | Santa Cruz de Tenerife | Canary Islands | 38017 |
| Summit of Mount Teide | La Orotava | Santa Cruz de Tenerife | Canary Islands | 38026 |
| Montserrat Monastery | Monistrol de Montserrat | Barcelona | Catalonia | 08127 |
| Sierra Nevada ski resort (Pradollano) | Monachil | Granada | Andalusia | 18134 |
| The Alhambra | Granada | Granada | Andalusia | 18087 |
| Cape Finisterre lighthouse | Fisterra | A Coruña | Galicia | 15037 |
Calculated on October 31, 2026 with the IGN boundaries the tool uses, at each place’s point in OpenStreetMap or CartoCiudad.
Barcelona’s airport isn’t in Barcelona at all but in the neighboring municipality of El Prat de Llobregat, and Tenerife South Airport belongs to Granadilla de Abona. That matters for local rules and permits, which each municipality sets for its own land.
Why it matters if you live in or visit Spain
If you move to Spain, one of your first errands is registering on the padrón, the list of residents that every town hall keeps (empadronarse). You need it for a public health card, school enrollment and most residency paperwork, and you register with the municipality where you live, not the nearest big city.
If you own property, the yearly property tax (IBI) and the tax charged when you sell (plusvalía municipal) go to the municipality where the property sits. Building permits, trash collection, parking permits, rules on barbecues or burning brush, and whether the local police or the Guardia Civil covers you also depend on it. And if you ever call 112, Spain’s emergency number, from somewhere remote, knowing the municipality helps them find you.
Right on the line: the Navacerrada pass
The example the tool opens with is the top of the Navacerrada pass, on the road from Madrid to Segovia. The point falls in Real Sitio de San Ildefonso (province of Segovia, Castile and León), but only about 20 meters (65 feet) from Los Baldíos, a stretch of mountain in the province of Madrid that belongs to no municipality. That’s why you see a warning that you’re next to the line.
The nearest street address, on the M-601 road, is already on the other side. That’s why we work out the municipality from the boundary itself, not from the closest address. Whenever you’re within 100 meters (330 feet) of another municipality we tell you, and if your GPS accuracy is worse than that, check the outline on the map.
Odd cases: enclaves, shared land and the sea
The tool checks the exact shape of every municipality, so it also gets the unusual ones right:
- Enclaves: Llívia is a Spanish town completely surrounded by France, and the Condado de Treviño belongs to Burgos even though it sits inside the Basque province of Álava.
- Shared commons: 81 areas, such as the Bardenas Reales desert in Navarre, are owned jointly by several municipalities and belong to none of them. You’ll see the area’s name marked “shared by several municipalities”.
- Land outside any province: six tiny islands and rocks off Morocco and in the Bidasoa river, such as the Peñón de Vélez de la Gomera, aren’t part of any province or region.
- The sea: coastal waters aren’t part of any municipality, so out at sea, or in the middle of the Mar Menor lagoon, the tool tells you you’re at sea. Reservoirs and rivers, on the other hand, do belong to a municipality.
Where the data comes from
Municipal boundaries come from the National Geographic Institute of Spain (IGN), the official source, simplified so they load fast on a phone, with an error of 11 meters (36 feet) at most. The five-digit INE code is the one the National Statistics Institute (INE) gives each municipality: the first two digits are the province. The nearest address, postal code and village come from CartoCiudad, the IGN’s official street database.
Frequently asked questions
Is a municipality the same as a town or city?
Not quite. A municipality is the area run by one town hall. It usually takes its name from its main town, but it can include several villages and lots of countryside. The tool shows both: the town or village, and the municipality it belongs to.
What is the INE code and when would I need it?
It’s the five-digit number Spain’s National Statistics Institute assigns to each municipality; the first two digits are the province (28 is Madrid, 08 Barcelona). Government forms, census data and many business databases use it.
Does this register me on the padrón?
No. The padrón is handled by each town hall, usually in person or through its website. This tool tells you which town hall that is.
Why does it say I’m near the boundary?
Because you’re less than 100 meters from another municipality. Between your GPS accuracy and the simplified boundaries, you could be on either side, so check the outline on the map.
Why are distances in meters?
This is a Spain tool, so it uses meters and kilometers by default. If you’ve picked miles in another Mapsfera tool, it remembers that and uses miles instead.
Does it work outside Spain?
Yes, but outside Spain the result comes from OpenStreetMap and isn’t official. For US counties, use “What county am I in?”.
Do you store my location?
No. The boundaries are downloaded to your device and the check happens there. Only the nearest-address lookup goes out, and we don’t keep it.
Related tools
All toolsSources
- Spain’s municipal, provincial and regional boundaries (BDDAE, simplified) · Instituto Geográfico Nacional, CC BY 4.0 ign.es
- CartoCiudad: Spanish addresses and postal codes · Instituto Geográfico Nacional, CC BY 4.0 ign.es
- Base map · OpenFreeMap, © OpenStreetMap contributors