List of postal codes in Spain

Spanish postal codes were introduced on 1 July 1984, when the introduced automated mail sorting. They consist of five numerical digits, where the first two digits, ranging 01 to 52, correspond either to one of the 50 provinces of Spain or to one of the two autonomous cities on the African coast.
Two-digit prefixes.
The first two digits of a Spanish postal code identify the province or autonomous city it belongs to. The numbers were assigned to the 50 provinces of Spain ordered alphabetically at the time of implementation. The official names of some of the provinces have since changed, either to the regional language version of the name (e.g. from the Spanish to the Basque ) or to adopt the name of the autonomous community instead of the provincial capital (e.g. Santander to Cantabria). In these cases, the originally assigned code has been maintained, resulting in some exceptions to the alphabetical order. In addition, Ceuta and Melilla were originally included within the postal areas of Cádiz and Málaga respectively; in 1995 they were assigned their own codes and hence ended up at the end of the list.
The list below includes all 52 two-digit prefixes assigned to the 50 provinces and two autonomous cities. Included in brackets are the names of the provinces that were used for alphabetical sorting at the time of implementation, if different from the current name used in English.
Following digits.
The third digit of a Spanish postal code is used to identify major cities or basic itineraries. A zero denotes a provincial capital, e.g. San Sebastián, as capital of the province of Gipuzkoa, uses the postal code 200xx.
The fourth and fifth digits are used to identify delivery areas, route itineraries or rural link itineraries.
Some codes are reserved for special use at the province capital:
Postal codes.
35000–35999: Las Palmas.
The province of Las Palmas includes the islands of Gran Canaria, Lanzarote (postal codes 355xx) and Fuerteventura (postal codes 356xx). The island of La Graciosa is administratively included within Lanzarote.
38000–38999: Santa Cruz de Tenerife.
The province of Santa Cruz de Tenerife includes the islands of Tenerife, La Palma (postal codes 387xx), La Gomera (postal codes 388xx) and El Hierro (postal codes 389xx).