Cities in Spain Ranked by Population density
Population divided by land area, both as recorded in Wikidata for the city proper. Cities without a recorded area are left out. Source: Wikidata (CC0 1.0 (public domain)).
Summary
L'Hospitalet de Llobregat ranks #1 with 23,348 people per km². Barcelona is second with 17,094 people per km², 36.6% behind. The top five are L'Hospitalet de Llobregat, Barcelona, Portugalete, Badalona and Melilla. The median across all 28 is 2,929 people per km²; Badajoz is last at 102.2 people per km².
- #1
- L'Hospitalet de Llobregat · 23,348 people per km²
- Median
- 2,929 people per km²
- Coverage
- 28 cities in Spain
- Data year
- As recorded in Wikidata
- Last updated
- 2026-11-14
Full ranking
| Rank | City | Country | Population density (people per km²) |
|---|---|---|---|
| 1 | L'Hospitalet de Llobregat | Spain | 23,348 |
| 2 | Barcelona | Spain | 17,094 |
| 3 | Portugalete | Spain | 13,970 |
| 4 | Badalona | Spain | 10,922 |
| 5 | Melilla | Spain | 7,034 |
| 6 | Coslada | Spain | 6,654 |
| 7 | Sabadell | Spain | 5,962 |
| 8 | Ibiza | Spain | 4,967 |
| 9 | Móstoles | Spain | 4,736 |
| 10 | Leganés | Spain | 4,553 |
| 11 | Ceuta | Spain | 4,519 |
| 12 | Barakaldo | Spain | 3,504 |
| 13 | Terrassa | Spain | 3,323 |
| 14 | Arrecife | Spain | 3,117 |
| 15 | Alcobendas | Spain | 2,742 |
| 16 | Palma | Spain | 2,084 |
| 17 | Alicante | Spain | 1,820 |
| 18 | Castellón de la Plana | Spain | 1,650 |
| 19 | San Cristóbal de La Laguna | Spain | 1,579 |
| 20 | Málaga | Spain | 1,517 |
| 21 | Torrelavega | Spain | 1,457 |
| 22 | Torrent | Spain | 1,313 |
| 23 | Villarreal | Spain | 972.8 |
| 24 | Segovia | Spain | 320.2 |
| 25 | Aranjuez | Spain | 313.5 |
| 26 | Ávila | Spain | 254.9 |
| 27 | Plasencia | Spain | 184.1 |
| 28 | Badajoz | Spain | 102.2 |
About the top 10
#1 L'Hospitalet de Llobregat
L'Hospitalet de Llobregat ranks #1 on this list with 23,348 people per km².
- Country
- Spain
- Population
- 289,510 people (2025)
- Area
- 12.4 km²
- Density
- 23,348 people per km²
- Elevation
- 8 m
- Coordinates
- 41.36° N, 2.10° E
#2 Barcelona
Barcelona ranks #2 on this list with 17,094 people per km².
- Country
- Spain
- Population
- 1,731,649 people (2025)
- Area
- 101.3 km²
- Density
- 17,094 people per km²
- Elevation
- 12 m
- Coordinates
- 41.38° N, 2.18° E
Also ranks #41 in population density · #76 in latitude · #83 in elevation.
#3 Portugalete
Portugalete ranks #3 on this list with 13,970 people per km².
- Country
- Spain
- Population
- 44,843 people (2025)
- Area
- 3.21 km²
- Density
- 13,970 people per km²
- Elevation
- 26 m
- Founded
- 1322
- Coordinates
- 43.32° N, 3.02° W
#4 Badalona
Badalona ranks #4 on this list with 10,922 people per km².
- Country
- Spain
- Population
- 231,542 people (2025)
- Area
- 21.2 km²
- Density
- 10,922 people per km²
- Elevation
- 6 m
- Coordinates
- 41.43° N, 2.23° E
#5 Melilla
Melilla ranks #5 on this list with 7,034 people per km².
- Country
- Spain
- Population
- 86,780 people (2025)
- Area
- 12.3 km²
- Density
- 7,034 people per km²
- Elevation
- 30 m
- Coordinates
- 35.28° N, 2.95° W
#6 Coslada
Coslada ranks #6 on this list with 6,654 people per km².
- Country
- Spain
- Population
- 80,512 people (2025)
- Area
- 12.1 km²
- Density
- 6,654 people per km²
- Elevation
- 621 m
- Coordinates
- 40.43° N, 3.56° W
#7 Sabadell
Sabadell ranks #7 on this list with 5,962 people per km².
- Country
- Spain
- Population
- 225,368 people (2025)
- Area
- 37.8 km²
- Density
- 5,962 people per km²
- Elevation
- 190 m
- Founded
- 1799 BCE
- Coordinates
- 41.55° N, 2.11° E
#8 Ibiza
Ibiza ranks #8 on this list with 4,967 people per km².
- Country
- Spain
- Population
- 55,337 people (2025)
- Area
- 11.1 km²
- Density
- 4,967 people per km²
- Elevation
- 99 m
- Founded
- 653 BCE
- Coordinates
- 38.91° N, 1.43° E
#9 Móstoles
Móstoles ranks #9 on this list with 4,736 people per km².
- Country
- Spain
- Population
- 214,817 people (2025)
- Area
- 45.4 km²
- Density
- 4,736 people per km²
- Elevation
- 620 m
- Coordinates
- 40.33° N, 3.87° W
#10 Leganés
Leganés ranks #10 on this list with 4,553 people per km².
- Country
- Spain
- Population
- 195,734 people (2025)
- Area
- 43 km²
- Density
- 4,553 people per km²
- Elevation
- 666 m
- Coordinates
- 40.33° N, 3.77° W
Profile facts: Wikidata (CC0).
Source and method
Population divided by land area, both as recorded in Wikidata for the city proper. Cities without a recorded area are left out.
Source: Wikidata. Licence: CC0 1.0 (public domain). Retrieved: 2026-11-14.
Data: Wikidata (CC0)
Values are shown as published. Provider terms: Wikidata. All licences: Sources & licences.