Municipalities of Spain by population
Madrid had the highest population of 8131 municipalities in 2021, at 3.31 million. Illán de Vacas had the lowest, at 3. The median was 523 and the figure for Spain was 47.39 million. Source: the Instituto Nacional de Estadística.
Top 40 municipalities, 2021
Full ranking
| Rank | Municipalities | 2021 | Change on 2020 |
|---|---|---|---|
| 1 | Madrid | 3,305,408 | -0.9% |
| 2 | Barcelona | 1,636,732 | -1.6% |
| 3 | València | 789,744 | -1.3% |
| 4 | Sevilla | 684,234 | -1% |
| 5 | Zaragoza | 675,301 | -1% |
| 6 | Málaga | 577,405 | -0.2% |
| 7 | Murcia | 460,349 | +0.2% |
| 8 | Palma | 419,366 | -0.8% |
| 9 | Las Palmas de Gran Canaria | 378,675 | -0.7% |
| 10 | Bilbao | 346,405 | -1.1% |
| 11 | Alacant/Alicante | 337,304 | -0.1% |
| 12 | Córdoba | 322,071 | -1.2% |
| 13 | Valladolid | 297,775 | -0.5% |
| 14 | Vigo | 293,837 | -1% |
| 15 | Gijón | 268,896 | -1% |
| 16 | L'Hospitalet de Llobregat | 264,657 | -1.8% |
| 17 | Vitoria-Gasteiz | 253,093 | -0.4% |
| 18 | A Coruña | 245,468 | -0.9% |
| 19 | Elx/Elche | 234,205 | -0.2% |
| 20 | Granada | 231,775 | -0.8% |
| 21 | Terrassa | 223,011 | -0.3% |
| 22 | Badalona | 223,006 | -0.1% |
| 23 | Oviedo | 217,552 | -1.1% |
| 24 | Cartagena | 216,365 | +0.1% |
| 25 | Sabadell | 216,204 | -0.1% |
| 26 | Jerez de la Frontera | 212,801 | -0.1% |
| 27 | Móstoles | 209,639 | -0.3% |
| 28 | Santa Cruz de Tenerife | 208,563 | -0.3% |
| 29 | Pamplona/Iruña | 203,081 | -0.4% |
| 30 | Almería | 200,753 | -0.3% |
| 31 | Alcalá de Henares | 195,982 | -0.8% |
| 32 | Fuenlabrada | 192,233 | -1.2% |
| 33 | Donostia/San Sebastián | 188,102 | -0.1% |
| 34 | Leganés | 187,762 | -1.8% |
| 35 | Getafe | 183,095 | -1.1% |
| 36 | Burgos | 174,051 | -1.3% |
| 37 | Albacete | 172,722 | -0.9% |
| 38 | Castelló de la Plana/Castellón de la Plana | 172,589 | -1% |
| 39 | Santander | 172,221 | -0.7% |
| 40 | Alcorcón | 170,817 | -0.9% |
| 41 | San Cristóbal de La Laguna | 158,010 | -0.6% |
| 42 | Logroño | 150,808 | -1.1% |
| 43 | Badajoz | 150,610 | -0.2% |
| 44 | Marbella | 147,958 | +0.2% |
| 45 | Salamanca | 143,269 | -1.1% |
| 46 | Huelva | 142,538 | -0.9% |
| 47 | Lleida | 140,080 | -0.2% |
| 48 | Dos Hermanas | 136,250 | +0.9% |
| 49 | Tarragona | 135,436 | -0.8% |
| 50 | Torrejón de Ardoz | 132,771 | -0.1% |
| 51 | Parla | 131,689 | -1.3% |
| 52 | Mataró | 129,120 | -0.4% |
| 53 | Algeciras | 122,982 | -0.1% |
| 54 | León | 122,051 | -1.6% |
| 55 | Santa Coloma de Gramenet | 119,289 | -1% |
| 56 | Alcobendas | 116,589 | -1.5% |
| 57 | Cádiz | 114,244 | -1% |
| 58 | Jaén | 111,932 | -0.7% |
| 59 | Reus | 106,084 | -0.1% |
| 60 | Ourense | 104,596 | -1% |
| 61 | Telde | 102,769 | -0% |
| 62 | Girona | 101,932 | -1.4% |
| 63 | Barakaldo | 100,907 | -0.6% |
| 64 | Roquetas de Mar | 98,725 | +0.3% |
| 65 | Santiago de Compostela | 97,858 | 0% |
| 66 | Lugo | 97,613 | -0.9% |
| 67 | Lorca | 96,238 | +0.8% |
| 68 | Cáceres | 95,418 | -0.9% |
| 69 | San Fernando | 94,867 | -0.1% |
| 70 | Las Rozas de Madrid | 94,862 | -1.3% |
| 71 | Sant Cugat del Vallès | 94,012 | +1.1% |
| 72 | Rivas-Vaciamadrid | 92,925 | +2.1% |
| 73 | San Sebastián de los Reyes | 90,962 | -0.3% |
| 74 | Cornellà de Llobregat | 89,300 | -0.7% |
| 75 | El Puerto de Santa María | 89,060 | +0.4% |
| 76 | Pozuelo de Alarcón | 87,134 | -0% |
| 77 | Guadalajara | 87,064 | -0.5% |
| 78 | Mijas | 86,744 | +1.6% |
| 79 | Chiclana de la Frontera | 86,306 | +1.4% |
| 80 | Melilla | 86,261 | -0.9% |
| 81 | Toledo | 85,449 | -0.4% |
| 82 | Torrent | 84,025 | +0.1% |
| 83 | El Ejido | 84,005 | +0.3% |
| 84 | Sant Boi de Llobregat | 83,755 | -0.9% |
| 85 | Ceuta | 83,517 | -0.8% |
| 86 | Talavera de la Reina | 83,477 | -0.2% |
| 87 | Pontevedra | 83,114 | -0.2% |
| 88 | Vélez-Málaga | 82,967 | +0.7% |
| 89 | Torrevieja | 82,842 | -2.2% |
| 90 | Fuengirola | 82,585 | -0.3% |
| 91 | Arona | 82,563 | -0.3% |
| 92 | Coslada | 81,273 | -0.1% |
| 93 | Orihuela | 78,940 | +0.6% |
| 94 | Rubí | 78,549 | -0.1% |
| 95 | Manresa | 78,192 | -0.1% |
| 96 | Valdemoro | 77,587 | +0.4% |
| 97 | Getxo | 77,139 | -0.8% |
| 98 | Palencia | 77,090 | -1.3% |
| 99 | Avilés | 76,874 | -1.2% |
| 100 | Gandia | 75,970 | +0.2% |
| 101 | Alcalá de Guadaíra | 75,546 | 0% |
| 102 | Ciudad Real | 75,104 | -0.5% |
| 103 | Santa Lucía de Tirajana | 73,573 | -1.4% |
| 104 | Molina de Segura | 73,498 | +0.6% |
| 105 | Majadahonda | 72,034 | -0.2% |
| 106 | Estepona | 71,925 | +2.4% |
| 107 | Paterna | 71,361 | +0.5% |
| 108 | Benalmádena | 70,204 | +1.5% |
| 109 | Sanlúcar de Barrameda | 69,507 | +0.4% |
| 110 | Benidorm | 69,118 | -1.9% |
| 111 | Torremolinos | 68,056 | -1.6% |
| 112 | Vilanova i la Geltrú | 67,458 | -0.4% |
| 113 | Castelldefels | 67,226 | -0.3% |
| 114 | Sagunt/Sagunto | 67,043 | -0.2% |
| 115 | Viladecans | 66,707 | -0.7% |
| 116 | El Prat de Llobregat | 65,532 | +0.2% |
| 117 | Ferrol | 64,785 | -1.2% |
| 118 | Arrecife | 64,497 | -0.2% |
| 119 | Collado Villalba | 63,825 | -0.9% |
| 120 | Ponferrada | 63,747 | -1.2% |
| 121 | La Línea de la Concepción | 63,365 | -0.4% |
| 122 | Irun | 62,933 | 0% |
| 123 | Granollers | 62,475 | +0.1% |
| 124 | Zamora | 60,297 | -1.1% |
| 125 | Aranjuez | 59,833 | -0.8% |
| 126 | Mérida | 59,424 | -0.2% |
| 127 | Alcoi/Alcoy | 59,128 | -0.4% |
| 128 | Boadilla del Monte | 59,052 | +4.1% |
| 129 | Sant Vicent del Raspeig/San Vicente del Raspeig | 58,912 | -0.1% |
| 130 | Motril | 58,545 | +0.1% |
| 131 | Ávila | 57,949 | -0.7% |
| 132 | Cerdanyola del Vallès | 57,217 | -1.1% |
| 133 | Linares | 56,525 | -1.4% |
| 134 | Arganda del Rey | 56,386 | -0.5% |
| 135 | Cuenca | 53,988 | -1.2% |
| 136 | Pinto | 53,537 | +0.4% |
| 137 | Huesca | 53,429 | -1% |
| 138 | San Bartolomé de Tirajana | 53,066 | -0.6% |
| 139 | Elda | 52,551 | -0.5% |
| 140 | Colmenar Viejo | 52,480 | +1% |
| 141 | Granadilla de Abona | 51,850 | +1.2% |
| 142 | Siero | 51,608 | +0.2% |
| 143 | Calvià | 51,567 | -0.3% |
| 144 | Segovia | 51,258 | -1.5% |
| 145 | Torrelavega | 51,237 | -0.7% |
| 146 | Mollet del Vallès | 51,151 | -0.9% |
| 147 | Utrera | 51,145 | +0.4% |
| 148 | Vila-real | 51,130 | -0.3% |
| 149 | Eivissa | 50,643 | -0.9% |
| 150 | Rincón de la Victoria | 49,790 | +2.1% |
| 151 | Tres Cantos | 48,751 | +0.9% |
| 152 | Adeje | 48,733 | -0.6% |
| 153 | Vic | 47,319 | -0.7% |
| 154 | Figueres | 47,043 | -0.4% |
| 155 | Gavà | 46,931 | -0.3% |
| 156 | Mairena del Aljarafe | 46,895 | +0.7% |
| 157 | Esplugues de Llobregat | 46,777 | -0.8% |
| 158 | Santurtzi | 46,085 | 0% |
| 159 | Puertollano | 46,036 | -1.2% |
| 160 | Sant Feliu de Llobregat | 45,463 | -0% |
| 161 | Portugalete | 45,285 | -1% |
| 162 | Alzira | 44,865 | -0.2% |
| 163 | Manacor | 44,809 | +0.6% |
| 164 | Mislata | 44,320 | 0% |
| 165 | Dénia | 42,953 | +0.3% |
| 166 | Lucena | 42,712 | -0% |
| 167 | Alcantarilla | 42,559 | +0.5% |
| 168 | La Orotava | 42,219 | +0.1% |
| 169 | Alhaurín de la Torre | 41,868 | +1.7% |
| 170 | Puerto del Rosario | 41,786 | -0.1% |
| 171 | Puerto Real | 41,771 | +0.2% |
| 172 | Antequera | 41,348 | +0.1% |
| 173 | Igualada | 40,875 | +0.3% |
| 174 | Basauri | 40,535 | -0.8% |
| 175 | Blanes | 40,274 | +0.9% |
| 176 | Santa Eulària des Riu | 40,038 | +1.7% |
| 177 | Vilafranca del Penedès | 39,969 | -0.5% |
| 178 | Écija | 39,838 | -0.1% |
| 179 | Soria | 39,695 | -0.3% |
| 180 | Plasencia | 39,558 | -0.8% |
| 181 | San Fernando de Henares | 39,313 | -0.6% |
| 182 | Errenteria | 39,219 | -0.8% |
| 183 | La Rinconada | 39,204 | +0.4% |
| 184 | Ripollet | 39,139 | -0.1% |
| 185 | Narón | 38,913 | -0.4% |
| 186 | El Vendrell | 38,891 | +1.3% |
| 187 | Burjassot | 38,712 | +0.2% |
| 188 | Langreo | 38,683 | -1.3% |
| 189 | Los Palacios y Villafranca | 38,678 | +0.3% |
| 190 | Arucas | 38,535 | +0.5% |
| 191 | Lloret de Mar | 38,402 | -1.8% |
| 192 | Marratxí | 38,357 | +1.7% |
| 193 | Llucmajor | 38,224 | +1.3% |
| 194 | Vilagarcía de Arousa | 37,545 | -0.1% |
| 195 | Torre-Pacheco | 37,299 | +2.3% |
| 196 | Sant Adrià de Besòs | 37,283 | -0.4% |
| 197 | Don Benito | 37,275 | -0% |
| 198 | Mieres | 37,026 | -1.4% |
| 199 | Tudela | 37,008 | -0.1% |
| 200 | Oleiros | 36,922 | +1.1% |
| 201 | Los Realejos | 36,824 | +0.3% |
| 202 | Montcada i Reixac | 36,794 | -0% |
| 203 | Olot | 36,299 | +1% |
| 204 | Andújar | 36,212 | -1.1% |
| 205 | Teruel | 35,994 | -0.7% |
| 206 | Tomelloso | 35,984 | -0.5% |
| 207 | Águilas | 35,956 | +0.7% |
| 208 | Ontinyent | 35,946 | +0.5% |
| 209 | Miranda de Ebro | 35,528 | -0.6% |
| 210 | Cieza | 35,301 | +0.1% |
| 211 | Azuqueca de Henares | 35,236 | -0.5% |
| 212 | Yecla | 35,083 | +0.7% |
| 213 | Cambrils | 35,064 | +1% |
| 214 | Borriana/Burriana | 34,903 | -0.4% |
| 215 | Galapagar | 34,712 | +0.6% |
| 216 | la Vila Joiosa/Villajoyosa | 34,684 | -1.5% |
| 217 | Úbeda | 34,208 | -0.4% |
| 218 | Santa Pola | 34,148 | +2.5% |
| 219 | Sant Joan Despí | 34,130 | -0.4% |
| 220 | Villena | 34,025 | -0.4% |
| 221 | Petrer | 34,009 | -0.7% |
| 222 | Almendralejo | 33,741 | -0.3% |
| 223 | Inca | 33,726 | +0.1% |
| 224 | Arroyomolinos | 33,687 | +2.3% |
| 225 | San Javier | 33,645 | +1.6% |
| 226 | Ronda | 33,624 | -0.3% |
| 227 | Tortosa | 33,572 | +0.4% |
| 228 | Aranda de Duero | 33,084 | -0.3% |
| 229 | Barberà del Vallès | 33,016 | -1% |
| 230 | Mazarrón | 32,988 | +0.5% |
| 231 | Castro-Urdiales | 32,975 | +2.2% |
| 232 | Arteixo | 32,894 | +0.5% |
| 233 | Totana | 32,316 | -0.7% |
| 234 | Aldaia | 32,313 | +0.3% |
| 235 | Salt | 32,230 | +0.3% |
| 236 | Leioa | 32,188 | +0.5% |
| 237 | San Roque | 32,178 | +1.9% |
| 238 | Agüimes | 32,105 | +0.6% |
| 239 | Ames | 31,993 | -0.3% |
| 240 | Ingenio | 31,887 | +0.6% |
| 241 | la Vall d'Uixó | 31,549 | -0.4% |
| 242 | Sant Pere de Ribes | 31,525 | +1.3% |
| 243 | Níjar | 31,458 | -0.7% |
| 244 | Carballo | 31,414 | -0% |
| 245 | Manises | 31,287 | +0.2% |
| 246 | Arcos de la Frontera | 30,902 | +0.3% |
| 247 | Coria del Río | 30,774 | -0.4% |
| 248 | Culleredo | 30,758 | +0.2% |
| 249 | Navalcarnero | 30,695 | +2.4% |
| 250 | Ciutadella de Menorca | 30,638 | +0.2% |
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. 5 municipalities with data in other periods have no value for 2021 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, 2021) [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, 2021. Instituto Nacional de Estadística, https://www.ine.es/jaxiT3/Tabla.htm?t=29005. Invokely, https://invokely.ai/rankings/population/spain-municipalities?period=2021. 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, 2021. 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=2021.
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, 2021 [Dataset]. Available at: https://www.ine.es/jaxiT3/Tabla.htm?t=29005, via Invokely: https://invokely.ai/rankings/population/spain-municipalities?period=2021 (Accessed: 11 October 2026).
BibTeX
@misc{instituto_municipalities_of_spain_by_2021,
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, 2021}},
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=2021. 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, 2021
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=2021
Y2 - 2026/10/11
N1 - Accessed via Invokely, https://invokely.ai/rankings/population/spain-municipalities?period=2021.
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.31 million in 2021, according to the Instituto Nacional de Estadística.
Which municipality has the lowest population?
Illán de Vacas, with 3 in 2021.
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. 5 municipalities have no value for 2021 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