Municipalities in a radius (Spain)
Pick a point in Spain and a radius to see which municipalities fall inside, with their population, province, INE code and distance, on the map and in a list for Excel.
Counts the municipalities whose main town is within the radius. The distance is to that town.
Loading the map…
Loading data for this area…
| Direction |
|---|
What’s inside this radius?
Open the same circle in another tool, no need to search again.
How to use it
Search for an address or a town, use your location or tap the map to set the center, then choose the radius with the slider, by typing a number or with the quick values. It works in kilometers, as Spain does, and switches to miles with one tap. The list runs from nearest to farthest; tap a column header to sort by population or by name, and tap a municipality to see it on the map.
Download CSV gives you every municipality inside with its INE code, province, population (municipal register, 2025), land area, distance, direction and coordinates, ready for Excel or a GIS. The link keeps the center and the radius, so whoever opens it sees exactly the same list.
Town inside, or any part inside?
In Spain a municipality isn’t a point but a whole territory, the término municipal, which can stretch for hundreds of square kilometers and include several villages. So there are two ways to count. With “Town inside”, a municipality counts when its main town, the seat that gives it its name, is within the radius, and the distance is to that town. With “Any part inside”, every municipality the circle reaches into counts, however little, and a column shows the share of its land inside.
For example, 25 km (15.5 miles) around the Puerta del Sol, in the center of Madrid, take in 30 municipalities by their main town, home to 5,844,128 people. The closest are Madrid, Pozuelo de Alarcón and Leganés, and the largest after Madrid are Móstoles (214,817), Leganés (195,734) and Getafe (193,238). Counting every municipality with some land inside the circle, there are 50.
The first count answers “which towns are near here?”. The second is the one for plans drawn as a radius around a point, like emergency planning zones or service areas, because a municipality is affected even when its main town lies outside.
Spanish municipalities in a nutshell
Spain is divided into 8,132 municipalities (municipios), each with its own town council. They cover practically all the land, so there’s nothing like unincorporated territory: every farm, forest and beach belongs to one. They’re grouped into 50 provinces and the autonomous cities of Ceuta and Melilla, and those into 17 autonomous communities.
Every municipality has an INE code, the five-digit number given by Spain’s National Statistics Institute. The first two digits are the province (28 for Madrid, 08 for Barcelona), so the code is the safest way to match this list with other official data: names repeat across provinces, and many places have two official names, in Spanish and in Catalan, Galician or Basque.
The population is the official figure from the padrón, the municipal register of residents, as of January 1, 2025. Everyone living in Spain must be registered in their municipality, so it’s a complete count published every year.
Why municipalities and not postal codes?
Spain has postal codes too, but their boundaries are managed by Correos, the national postal service, and aren’t released under an open license. Municipalities are the open, official alternative: their boundaries come from the National Geographic Institute (IGN) and their codes from the INE, which every public body and most databases use.
If you need the postal code of a particular address, the Spain postal code lookup gives it to you from CartoCiudad, the official street map.
Where the data comes from
Population: Mapsfera with data from the INE website (www.ine.es), municipal register as of January 1, 2025, updated December 11, 2025. The point of each municipality is its seat in the IGN gazetteer, and the municipal boundaries come from the IGN’s database of administrative divisions (CC BY 4.0), simplified to about 10 meters. Distances are straight lines on the WGS84 ellipsoid, from the center of the circle to each main town.
Frequently asked questions
How many municipalities can I get?
All the ones inside, up to a radius of 500 km (or 500 miles, if you switch units). The page shows the 500 closest; the CSV has every one of them.
Is the distance a straight line or a driving distance?
A straight line, from the center of the circle to each municipality’s main town. Driving distances are always a bit longer.
What is an INE code?
The five-digit code Spain’s National Statistics Institute gives each municipality. The first two digits are the province, which makes it the best key to join the list with other data.
Can I get Spanish postal codes in a radius?
Not with open data: Correos doesn’t publish postal code boundaries under a free license. Municipalities, with their INE codes, are the official free alternative.
Can I use miles?
Yes. The tool starts in kilometers because the circle is in Spain, and the km/mi switch changes the radius, the distances and the CSV.
What if the circle crosses into Portugal or France?
Only Spanish municipalities are listed: this tool has no data for Portugal, France or Andorra.
Is there a US version?
Yes: ZIP codes in a radius lists the US ZIP code areas inside a circle, with Census population.
Related tools
All toolsSources
- Official population figures from the municipal register, January 1, 2025 · INE (Spain’s National Statistics Institute). Mapsfera with data from the INE website: www.ine.es (updated December 11, 2025)
- Municipal boundaries (BDDAE) and gazetteer of municipalities · Instituto Geográfico Nacional, Spain (CC BY 4.0 ign.es)
- Base map · OpenFreeMap, with OpenStreetMap data