Municipalities of Spain by population
Madrid had the highest population of 8124 municipalities in 2017, at 3.18 million. Villarroya had the lowest, at 5. The median was 531 and the figure for Spain was 46.57 million. Source: the Instituto Nacional de Estadística.
Top 40 municipalities, 2017
Full ranking
| Rank | Municipalities | 2017 | Change on 2016 |
|---|---|---|---|
| 1 | Madrid | 3,182,981 | +0.6% |
| 2 | Barcelona | 1,620,809 | +0.7% |
| 3 | València | 787,808 | -0.3% |
| 4 | Sevilla | 689,434 | -0.2% |
| 5 | Zaragoza | 664,938 | +0.6% |
| 6 | Málaga | 569,002 | -0% |
| 7 | Murcia | 443,243 | +0.5% |
| 8 | Palma | 406,492 | +0.9% |
| 9 | Las Palmas de Gran Canaria | 377,650 | -0.4% |
| 10 | Bilbao | 345,110 | -0% |
| 11 | Alacant/Alicante | 329,988 | -0.2% |
| 12 | Córdoba | 325,916 | -0.2% |
| 13 | Valladolid | 299,715 | -0.7% |
| 14 | Vigo | 292,986 | +0.1% |
| 15 | Gijón | 272,365 | -0.4% |
| 16 | L'Hospitalet de Llobregat | 257,349 | +1% |
| 17 | Vitoria-Gasteiz | 246,976 | +1% |
| 18 | A Coruña | 244,099 | 0% |
| 19 | Granada | 232,770 | -0.8% |
| 20 | Elx/Elche | 228,675 | +0.4% |
| 21 | Oviedo | 220,301 | -0.1% |
| 22 | Terrassa | 216,428 | +0.6% |
| 23 | Badalona | 215,848 | +0.1% |
| 24 | Cartagena | 214,177 | -0.3% |
| 25 | Jerez de la Frontera | 212,915 | 0% |
| 26 | Sabadell | 209,931 | +0.8% |
| 27 | Móstoles | 206,589 | +0.5% |
| 28 | Santa Cruz de Tenerife | 203,692 | +0.1% |
| 29 | Pamplona/Iruña | 197,138 | +0.8% |
| 30 | Almería | 195,389 | +0.4% |
| 31 | Fuenlabrada | 194,669 | +0.3% |
| 32 | Alcalá de Henares | 194,310 | -0.8% |
| 33 | Leganés | 187,720 | +0.3% |
| 34 | Donostia/San Sebastián | 186,370 | +0.2% |
| 35 | Getafe | 178,288 | +0.9% |
| 36 | Burgos | 175,623 | -0.6% |
| 37 | Albacete | 172,816 | +0.2% |
| 38 | Santander | 171,951 | -0.4% |
| 39 | Castelló de la Plana/Castellón de la Plana | 169,498 | -0.9% |
| 40 | Alcorcón | 168,141 | +0.5% |
| 41 | San Cristóbal de La Laguna | 153,655 | +0.4% |
| 42 | Logroño | 150,979 | +0.1% |
| 43 | Badajoz | 150,543 | +0.4% |
| 44 | Huelva | 145,115 | -0.2% |
| 45 | Salamanca | 144,436 | -0.4% |
| 46 | Marbella | 141,172 | +0.3% |
| 47 | Lleida | 137,327 | -0.6% |
| 48 | Dos Hermanas | 132,551 | +0.5% |
| 49 | Tarragona | 131,507 | +0.3% |
| 50 | Torrejón de Ardoz | 128,013 | +0.8% |
| 51 | Mataró | 126,127 | +0.5% |
| 52 | Parla | 125,898 | +1% |
| 53 | León | 125,317 | -0.7% |
| 54 | Algeciras | 121,133 | +0.4% |
| 55 | Cádiz | 118,048 | -0.7% |
| 56 | Santa Coloma de Gramenet | 117,597 | +0.4% |
| 57 | Alcobendas | 114,864 | +1.3% |
| 58 | Jaén | 114,238 | -0.4% |
| 59 | Ourense | 105,636 | -0.2% |
| 60 | Reus | 103,123 | -0.5% |
| 61 | Telde | 102,005 | -0.2% |
| 62 | Barakaldo | 100,313 | +0.3% |
| 63 | Girona | 99,013 | +0.8% |
| 64 | Lugo | 97,995 | -0.3% |
| 65 | Santiago de Compostela | 96,456 | +0.5% |
| 66 | Cáceres | 95,917 | +0.1% |
| 67 | San Fernando | 95,643 | -0.3% |
| 68 | Las Rozas de Madrid | 95,071 | +0.6% |
| 69 | Roquetas de Mar | 93,363 | +1.5% |
| 70 | Lorca | 92,299 | +0.6% |
| 71 | Sant Cugat del Vallès | 89,516 | +0.7% |
| 72 | El Puerto de Santa María | 88,430 | +0.3% |
| 73 | El Ejido | 88,096 | -0.7% |
| 74 | San Sebastián de los Reyes | 86,707 | +0.6% |
| 75 | Cornellà de Llobregat | 86,610 | +0.6% |
| 76 | Melilla | 86,120 | +0.1% |
| 77 | Pozuelo de Alarcón | 85,605 | +0.7% |
| 78 | Ceuta | 84,959 | +0.5% |
| 79 | Guadalajara | 84,145 | +0.6% |
| 80 | Rivas-Vaciamadrid | 83,767 | +1.3% |
| 81 | Toledo | 83,741 | +0.3% |
| 82 | Talavera de la Reina | 83,303 | -1% |
| 83 | Torrevieja | 83,252 | -1.1% |
| 84 | Chiclana de la Frontera | 83,148 | +0.6% |
| 85 | Coslada | 83,011 | -1.8% |
| 86 | Pontevedra | 82,671 | +0.1% |
| 87 | Sant Boi de Llobregat | 82,142 | -0.3% |
| 88 | Torrent | 80,630 | -0.2% |
| 89 | Vélez-Málaga | 79,878 | +1.3% |
| 90 | Avilés | 79,514 | -0.7% |
| 91 | Arona | 78,930 | -0.3% |
| 92 | Palencia | 78,892 | -0.3% |
| 93 | Getxo | 78,406 | -0.2% |
| 94 | Mijas | 77,151 | -0.8% |
| 95 | Orihuela | 76,097 | -5.3% |
| 96 | Rubí | 75,568 | +0.5% |
| 97 | Manresa | 75,152 | +0.5% |
| 98 | Alcalá de Guadaíra | 75,106 | 0% |
| 99 | Fuengirola | 74,929 | -3.3% |
| 100 | Ciudad Real | 74,641 | +0.8% |
| 101 | Gandia | 74,121 | -0.9% |
| 102 | Valdemoro | 73,976 | +1.4% |
| 103 | Majadahonda | 71,299 | +0.8% |
| 104 | Santa Lucía de Tirajana | 70,396 | +1.8% |
| 105 | Molina de Segura | 70,344 | +1% |
| 106 | Benalmádena | 68,859 | +2.4% |
| 107 | Paterna | 68,547 | +1% |
| 108 | Torremolinos | 67,701 | -0.1% |
| 109 | Sanlúcar de Barrameda | 67,640 | 0% |
| 110 | Ferrol | 67,569 | -1.1% |
| 111 | Estepona | 66,863 | +0.3% |
| 112 | Benidorm | 66,831 | +0.3% |
| 113 | Vilanova i la Geltrú | 66,077 | +0.2% |
| 114 | Viladecans | 65,993 | +0.3% |
| 115 | Castelldefels | 65,954 | +1.6% |
| 116 | Ponferrada | 65,788 | -1% |
| 117 | Sagunt/Sagunto | 65,278 | +1.3% |
| 118 | El Prat de Llobregat | 63,897 | +0.7% |
| 119 | La Línea de la Concepción | 63,146 | -0.2% |
| 120 | Zamora | 62,389 | -1.3% |
| 121 | Collado Villalba | 62,152 | +0.9% |
| 122 | Irun | 61,855 | +0.4% |
| 123 | Granollers | 60,695 | +0.9% |
| 124 | Motril | 60,420 | +0.1% |
| 125 | Arrecife | 59,771 | +2.1% |
| 126 | Mérida | 59,187 | 0% |
| 127 | Alcoi/Alcoy | 59,106 | -0.2% |
| 128 | Linares | 58,449 | -0.6% |
| 129 | Aranjuez | 58,213 | +0.5% |
| 130 | Ávila | 58,149 | +0.1% |
| 131 | Cerdanyola del Vallès | 57,723 | +0.3% |
| 132 | Sant Vicent del Raspeig/San Vicente del Raspeig | 57,175 | +0.8% |
| 133 | Cuenca | 54,876 | -0.4% |
| 134 | Arganda del Rey | 53,821 | -0.8% |
| 135 | San Bartolomé de Tirajana | 53,542 | -0.5% |
| 136 | Utrera | 52,701 | +0.1% |
| 137 | Elda | 52,620 | -0.2% |
| 138 | Huesca | 52,223 | -0.1% |
| 139 | Torrelavega | 52,034 | -1.5% |
| 140 | Siero | 51,776 | -0.4% |
| 141 | Segovia | 51,756 | -1% |
| 142 | Boadilla del Monte | 51,463 | +3.4% |
| 143 | Mollet del Vallès | 51,128 | -0.7% |
| 144 | Pinto | 50,442 | +1.9% |
| 145 | Vila-real | 50,334 | +0.2% |
| 146 | Eivissa | 49,689 | +0.3% |
| 147 | Calvià | 49,063 | -1% |
| 148 | Colmenar Viejo | 48,614 | +1.2% |
| 149 | Puertollano | 48,477 | -1.4% |
| 150 | Adeje | 46,833 | -1% |
| 151 | Granadilla de Abona | 46,816 | +3.3% |
| 152 | Gavà | 46,538 | +0.6% |
| 153 | Portugalete | 46,120 | -0.5% |
| 154 | Tres Cantos | 46,046 | +2.9% |
| 155 | Figueres | 45,961 | +0.5% |
| 156 | Esplugues de Llobregat | 45,890 | +0.3% |
| 157 | Santurtzi | 45,765 | -0.6% |
| 158 | Mairena del Aljarafe | 45,471 | +1% |
| 159 | Rincón de la Victoria | 45,138 | +2.6% |
| 160 | Alzira | 44,255 | -0.5% |
| 161 | Sant Feliu de Llobregat | 44,198 | +0.3% |
| 162 | Vic | 43,964 | +1.6% |
| 163 | Mislata | 43,042 | +0.1% |
| 164 | Lucena | 42,511 | -0.2% |
| 165 | Dénia | 41,568 | +0.2% |
| 166 | La Orotava | 41,500 | +0.5% |
| 167 | Puerto Real | 41,472 | 0% |
| 168 | Alcantarilla | 41,331 | +0.4% |
| 169 | Antequera | 41,104 | +0.1% |
| 170 | Manacor | 41,095 | +2% |
| 171 | Basauri | 40,877 | -0.3% |
| 172 | Langreo | 40,529 | -1.6% |
| 173 | Plasencia | 40,360 | -0.7% |
| 174 | Écija | 40,087 | -0.5% |
| 175 | San Fernando de Henares | 39,681 | -1% |
| 176 | Vilafranca del Penedès | 39,532 | +0.4% |
| 177 | Errenteria | 39,439 | +0.1% |
| 178 | Igualada | 39,316 | +0.8% |
| 179 | Narón | 39,280 | -0.4% |
| 180 | Alhaurín de la Torre | 39,153 | +0.9% |
| 181 | Mieres | 38,962 | -1.4% |
| 182 | Soria | 38,881 | -0.7% |
| 183 | Blanes | 38,813 | -0.6% |
| 184 | Puerto del Rosario | 38,711 | +1.5% |
| 185 | La Rinconada | 38,339 | +0.2% |
| 186 | Los Palacios y Villafranca | 38,246 | +0.2% |
| 187 | Ripollet | 37,899 | +0.7% |
| 188 | Andújar | 37,611 | -1% |
| 189 | Burjassot | 37,575 | +0.7% |
| 190 | Vilagarcía de Arousa | 37,479 | +0.5% |
| 191 | Arucas | 37,367 | +0.2% |
| 192 | Don Benito | 36,924 | -0.1% |
| 193 | Lloret de Mar | 36,878 | -0.4% |
| 194 | Sant Adrià de Besòs | 36,624 | +0.4% |
| 195 | Santa Eulària des Riu | 36,605 | +1.3% |
| 196 | El Vendrell | 36,568 | +0.2% |
| 197 | Marratxí | 36,383 | +1.1% |
| 198 | Tomelloso | 36,281 | -1.3% |
| 199 | Los Realejos | 36,218 | +0.2% |
| 200 | Miranda de Ebro | 35,608 | -0.9% |
| 201 | Llucmajor | 35,513 | +1.3% |
| 202 | Teruel | 35,484 | -0.2% |
| 203 | Ontinyent | 35,342 | -0.5% |
| 204 | Tudela | 35,298 | +0.4% |
| 205 | Oleiros | 35,198 | +0.5% |
| 205 | Torre-Pacheco | 35,198 | +1.6% |
| 207 | Montcada i Reixac | 35,063 | +0.7% |
| 208 | Cieza | 34,987 | -0.4% |
| 209 | Azuqueca de Henares | 34,768 | +0.2% |
| 210 | Águilas | 34,758 | +0.1% |
| 211 | Úbeda | 34,733 | -0.3% |
| 212 | Petrer | 34,533 | 0% |
| 213 | Borriana/Burriana | 34,464 | -0.5% |
| 214 | Ronda | 34,268 | -0.3% |
| 215 | Olot | 34,194 | +0.6% |
| 216 | Yecla | 34,092 | +0.2% |
| 217 | Villena | 33,968 | -0.6% |
| 218 | Sant Joan Despí | 33,873 | +1.1% |
| 219 | la Vila Joiosa/Villajoyosa | 33,607 | +0.1% |
| 220 | Almendralejo | 33,540 | -2.9% |
| 221 | Tortosa | 33,445 | -0.9% |
| 222 | Galapagar | 32,903 | +1.5% |
| 223 | Barberà del Vallès | 32,860 | +0.1% |
| 224 | Cambrils | 32,855 | -1.3% |
| 225 | Aranda de Duero | 32,535 | -0.3% |
| 226 | Castro-Urdiales | 31,817 | -0.3% |
| 227 | la Vall d'Uixó | 31,733 | -0.3% |
| 228 | San Javier | 31,695 | -0.3% |
| 229 | Arteixo | 31,534 | +0.9% |
| 230 | Totana | 31,394 | +1.3% |
| 231 | Aldaia | 31,320 | +0.2% |
| 232 | Inca | 31,255 | +1% |
| 233 | Leioa | 31,197 | +1.1% |
| 234 | Carballo | 31,195 | -0.2% |
| 235 | Santa Pola | 31,137 | -0.5% |
| 236 | San Andrés del Rabanedo | 31,123 | -1.1% |
| 237 | Mazarrón | 30,996 | +1% |
| 238 | Arcos de la Frontera | 30,983 | -0.4% |
| 239 | Alcázar de San Juan | 30,943 | -0.1% |
| 240 | Agüimes | 30,882 | +0.5% |
| 241 | Ames | 30,835 | +1% |
| 242 | Manises | 30,630 | -0.2% |
| 243 | Camargo | 30,556 | -0.2% |
| 244 | Coria del Río | 30,535 | +0.4% |
| 245 | Ingenio | 30,529 | +0.6% |
| 246 | Valdepeñas | 30,224 | -0.2% |
| 247 | Hellín | 30,184 | -0.8% |
| 248 | Puente Genil | 30,173 | +0.3% |
| 249 | Sant Pere de Ribes | 30,142 | +1% |
| 250 | Puerto de la Cruz | 30,036 | +1.8% |
Other periods
About this ranking
Resident population.
More on how it is measured
- Spain and the EU: 1 January, with Spanish figures from the official municipal register (Padrón).
- Norway: Statistics Norway, 1 January.
- Iceland and its municipalities: Statistics Iceland, 1 January.
- United States: Census Bureau population estimates for 1 July.
- United Kingdom regions and local authorities: Office for National Statistics estimates for 30 June.
- Other countries and the World: World Bank mid-year estimates, which count all residents regardless of legal status or citizenship.
- UN World Population Prospects estimates for 1 July cover the years before 1960 and the areas the World Bank does not publish, such as Taiwan.
The World Bank series exists for every country, so use it (through compare) to rank countries on one basis.
Every value in the ranking comes from the same publisher and the same period, so the municipalities are compared on one definition. 12 municipalities with data in other periods have no value for 2017 and are left out rather than filled from another source. Equal values share a rank.
How to cite
Instituto Nacional de Estadística (INE). Cifras oficiales de población de los municipios españoles: Revisión del Padrón municipal (tabla 29005). https://www.ine.es/jaxiT3/Tabla.htm?t=29005. Retrieved 2026-10-11.
Citation styles
APA 7
Instituto Nacional de Estadística. (n.d.). Cifras oficiales de población de los municipios españoles: Revisión del Padrón municipal (tabla 29005) (Municipalities of Spain by population, 2017) [Data set]. Retrieved October 11, 2026, from https://www.ine.es/jaxiT3/Tabla.htm?t=29005
MLA 9
Cifras oficiales de población de los municipios españoles: Revisión del Padrón municipal (tabla 29005), Municipalities of Spain by population, 2017. Instituto Nacional de Estadística, https://www.ine.es/jaxiT3/Tabla.htm?t=29005. Invokely, https://invokely.ai/rankings/population/spain-municipalities?period=2017. Accessed 11 Oct. 2026.
Chicago (author-date)
Instituto Nacional de Estadística. n.d. Cifras oficiales de población de los municipios españoles: Revisión del Padrón municipal (tabla 29005). Municipalities of Spain by population, 2017. Dataset. Accessed October 11, 2026. https://www.ine.es/jaxiT3/Tabla.htm?t=29005. Also distributed by Invokely, https://invokely.ai/rankings/population/spain-municipalities?period=2017.
Harvard
Instituto Nacional de Estadística (no date) Cifras oficiales de población de los municipios españoles: Revisión del Padrón municipal (tabla 29005), Municipalities of Spain by population, 2017 [Dataset]. Available at: https://www.ine.es/jaxiT3/Tabla.htm?t=29005, via Invokely: https://invokely.ai/rankings/population/spain-municipalities?period=2017 (Accessed: 11 October 2026).
BibTeX
@misc{instituto_municipalities_of_spain_by_2017,
author = {{Instituto Nacional de Estadística}},
title = {{Cifras oficiales de población de los municipios españoles: Revisión del Padrón municipal (tabla 29005): Municipalities of Spain by population, 2017}},
howpublished = {Data set},
url = {https://www.ine.es/jaxiT3/Tabla.htm?t=29005},
urldate = {2026-10-11},
note = {Accessed via Invokely, https://invokely.ai/rankings/population/spain-municipalities?period=2017. Publisher attribution: Instituto Nacional de Estadística (INE). Cifras oficiales de población de los municipios españoles: Revisión del Padrón municipal (tabla 29005). https://www.ine.es/jaxiT3/Tabla.htm?t=29005. Retrieved 2026-10-11.},
}
RIS
TY - DATA
AU - Instituto Nacional de Estadística
TI - Cifras oficiales de población de los municipios españoles: Revisión del Padrón municipal (tabla 29005): Municipalities of Spain by population, 2017
PB - Instituto Nacional de Estadística
DB - Invokely
UR - https://www.ine.es/jaxiT3/Tabla.htm?t=29005
L2 - https://invokely.ai/rankings/population/spain-municipalities?period=2017
Y2 - 2026/10/11
N1 - Accessed via Invokely, https://invokely.ai/rankings/population/spain-municipalities?period=2017.
N1 - Publisher attribution: Instituto Nacional de Estadística (INE). Cifras oficiales de población de los municipios españoles: Revisión del Padrón municipal (tabla 29005). https://www.ine.es/jaxiT3/Tabla.htm?t=29005. Retrieved 2026-10-11.
ER -
Use this data in your AI agent
Invokely serves this figure to AI assistants through MCP and to code through a REST API, with the source and citation attached. Ask your assistant:
Rank Municipalities of Spain by population using official data, and cite the source.
rank_places {"indicator":"population","level":"municipality","within":"Spain","limit":10}
GET https://invokely.ai/api/v1/rank?indicator=population&level=municipality&within=Spain&limit=10
Questions
Which municipality has the highest population?
Madrid, with 3.18 million in 2017, according to the Instituto Nacional de Estadística.
Which municipality has the lowest population?
Villarroya, with 5 in 2017.
Where does this ranking come from?
Every value comes from one source and one period, so the places are comparable: Instituto Nacional de Estadística, Cifras oficiales de población de los municipios españoles: Revisión del Padrón municipal (tabla 29005). Retrieved 2026-10-11. 12 municipalities have no value for 2017 and are not ranked.
Population: other rankings
- Municipalities in Huelva province
- Municipalities in Segovia province
- Municipalities in Santa Cruz de Tenerife province
- Regions of Greece (NUTS 2)
- Cities in Ohio
- NUTS 3 areas of Romania