🇪🇸Spain Subdivisions
All 69 Spain subdivisions with ISO 3166-2:ES codes - Europe / Southern Europe
Total
69 subdivisions
Types
Autonomous city in north africa, Autonomous community, Province
ISO Standard
ISO 3166-2:ES
Code Example
import { subdivision } from '@koshmoney/countries';
// Get all Spain subdivisions
const subs = subdivision.getByCountry('ES');
// => 69 subdivisions
// Look up a specific subdivision
subdivision.get('ES-A');
// => { code: 'ES-A', name: 'Alacant*', type: 'Province' }
// Validate a subdivision code
subdivision.isValidCode('ES-A'); // true
subdivision.isValidRegion('ES', 'A'); // trueTree-Shaking Tip
Import only Spain subdivisions to minimize bundle size:
// Import only Spain subdivisions for smaller bundles
import { subdivisions } from '@koshmoney/countries/subdivision/ES';
Object.entries(subdivisions);
// => 69 entriesAll Spain Subdivisions
Autonomous city in north africas (2)
| Code | Name |
|---|---|
| ES-CE | Ceuta |
| ES-ML | Melilla |
Autonomous communitys (17)
| Code | Name |
|---|---|
| ES-AN | Andalucía |
| ES-AR | Aragón |
| ES-AS | Asturias, Principado de |
| ES-CB | Cantabria |
| ES-CL | Castilla y León |
| ES-CM | Castilla-La Mancha |
| ES-CN | Canarias |
| ES-CT | Catalunya |
| ES-EX | Extremadura |
| ES-GA | Galicia |
| ES-IB | Illes Balears |
| ES-MC | Murcia, Región de |
| ES-MD | Madrid, Comunidad de |
| ES-NC | Nafarroako Foru Komunitatea* |
| ES-PV | Euskal Herria |
| ES-RI | La Rioja |
| ES-VC | Valenciana, Comunidad |
Provinces (50)
| Code | Name |
|---|---|
| ES-A | Alacant* |
| ES-AB | Albacete |
| ES-AL | Almería |
| ES-AV | Ávila |
| ES-B | Barcelona |
| ES-BA | Badajoz |
| ES-BI | Bizkaia* |
| ES-BU | Burgos |
| ES-C | A Coruña |
| ES-CA | Cádiz |
| ES-CC | Cáceres |
| ES-CO | Córdoba |
| ES-CR | Ciudad Real |
| ES-CS | Castelló* |
| ES-CU | Cuenca |
| ES-GC | Las Palmas |
| ES-GI | Girona |
| ES-GR | Granada |
| ES-GU | Guadalajara |
| ES-H | Huelva |
| ES-HU | Huesca |
| ES-J | Jaén |
| ES-L | Lleida |
| ES-LE | León |
| ES-LO | La Rioja |
| ES-LU | Lugo |
| ES-M | Madrid |
| ES-MA | Málaga |
| ES-MU | Murcia |
| ES-NA | Nafarroa* |
| ES-O | Asturias |
| ES-OR | Ourense |
| ES-P | Palencia |
| ES-PM | Balears |
| ES-PO | Pontevedra |
| ES-S | Cantabria |
| ES-SA | Salamanca |
| ES-SE | Sevilla |
| ES-SG | Segovia |
| ES-SO | Soria |
| ES-SS | Gipuzkoa* |
| ES-T | Tarragona |
| ES-TE | Teruel |
| ES-TF | Santa Cruz de Tenerife |
| ES-TO | Toledo |
| ES-V | Valencia |
| ES-VA | Valladolid |
| ES-VI | Álava |
| ES-Z | Zaragoza |
| ES-ZA | Zamora |
FAQ
- How many subdivisions does Spain have?
- Spain has 69 subdivisions defined in ISO 3166-2:ES, including 2 autonomous city in north africas, 17 autonomous communitys, 50 provinces.
- What is the ISO 3166-2 code format for Spain?
- Spain subdivision codes follow the format ES-XX, where ES is the country's alpha-2 code and XX is the subdivision identifier. For example, ES-A represents Alacant*.
- How to get Spain subdivisions in JavaScript?
- Install
@koshmoney/countriesvia npm, then usesubdivision.getByCountry('ES')to get all 69 subdivisions.
Use Spain subdivision data in your project
Get all 69 Spain subdivisions with ISO 3166-2 codes, plus countries, currencies, postal codes, and more.
npm install @koshmoney/countries