Leading zeros
Nine provinces start with 0. Store 08001 as an integer and Barcelona becomes 8001. Excel does the same to a CSV on open, so import the column as text.
Get Spanish addresses with a real postal code for each city, floor and door in the local format, and street names in Catalan, Galician, or Basque where they belong. Built for test data and demos. Nothing here receives mail.
The street, number, and door are random. The city and postal code are real.
C/ de los Olivos, 63, 3º B
C/ de Sant Joan, 27, 2n 1a
Eliza k., 8, 4. ezk.
A form built on US or UK data fails on the same five points. Every batch from this generator puts them in front of your code, so you hit them in staging instead of production.
Nine provinces start with 0. Store 08001 as an integer and Barcelona becomes 8001. Excel does the same to a CSV on open, so import the column as text.
3º uses the ordinal sign U+00BA, not the degree sign ° at U+00B0. They look alike and fail an exact match. ASCII-only fields reject both.
Logroño, Cádiz, L'Hospitalet de Llobregat, Vitoria-Gasteiz. A city filter built on [A-Za-z ] rejects all four. Pick Barcelona or La Rioja above to force them.
Rural houses and some squares use s/n, short for sin número. A digits-only number field blocks them. Choose House to get these rows.
Most Spaniards in cities live in flats, so checkouts ask for piso and puerta. The CSV and JSON formats keep both as separate fields for mapping tests.
A Spanish address reads from smallest to largest, with the postal code before the town. The province follows in brackets when the town name differs from the province. Add España as the last line for mail sent from abroad.
Lucía Navarro Ortega
Calle de los Olivos, 63, 3º B
28039 Madrid
España
This is the first card in the tool on page load. Road words shorten on most envelopes, and floors use a vocabulary of their own. Older buildings put Entresuelo and Principal under 1º, so 1º might sit three flights up. Never sort residents by this field.
| Written | Meaning | Note |
|---|---|---|
C/ | Calle, street | INE road code CL |
Avda. | Avenida, avenue | INE road code AV |
Pza. | Plaza, square | INE road code PZ |
Pº | Paseo, promenade | INE road code PS |
s/n | Sin número, no street number | Goes where the number sits |
Bajo | Ground floor | Often a shop or a flat with street access |
Entresuelo | Mezzanine | Sits between Bajo and 1º in older buildings |
Principal | First raised floor | Also sits below 1º in older buildings |
Ático | Top floor | No number, so a numeric floor field rejects it |
Izda. / Dcha. | Left and right door | Replaces the door letter on many landings |
Local 3 | Business unit 3 | Street level premises, no floor or door |
Spanish postal codes run to five digits. The first two name the province, from 01 to 52, and the last three narrow down the delivery zone. A third digit of 0 usually marks the provincial capital, which is why Madrid city sits at 280xx.
The order looks strange until you see the rule: provinces took their numbers alphabetically under their old Spanish names. Bizkaia is 48 because it was Vizcaya, Girona is 17 because it was Gerona, and Asturias is 33 because it was Oviedo. Ceuta and Melilla close the list at 51 and 52.
01 Álava02 Albacete03 Alicante04 Almería05 Ávila06 Badajoz07 Illes Balears08 Barcelona09 Burgos10 Cáceres11 Cádiz12 Castellón13 Ciudad Real14 Córdoba15 A Coruña16 Cuenca17 Girona18 Granada19 Guadalajara20 Gipuzkoa21 Huelva22 Huesca23 Jaén24 León25 Lleida26 La Rioja27 Lugo28 Madrid29 Málaga30 Murcia31 Navarra32 Ourense33 Asturias34 Palencia35 Las Palmas36 Pontevedra37 Salamanca38 Santa Cruz de Tenerife39 Cantabria40 Segovia41 Sevilla42 Soria43 Tarragona44 Teruel45 Toledo46 Valencia47 Valladolid48 Bizkaia49 Zamora50 Zaragoza51 Ceuta52 MelillaTo validate the format in code, reject anything outside the 01 to 52 range, not only strings of the wrong length. A plain ^\d{5}$ accepts 99999.
^(0[1-9]|[1-4][0-9]|5[0-2])[0-9]{3}$
Spain has four languages in everyday street signs, and official street names follow the region. The Regional setting writes Catalan forms for Catalunya, the Valencian Community, and the Balearic Islands, Galician for Galicia, and Basque for the Basque Country. Town names switch too, so Valencia becomes València and San Sebastián becomes Donostia.
| Road | Castilian | Catalan | Galician | Basque |
|---|---|---|---|---|
| Street | Calle Mayor | Carrer Major | Rúa Real | Eliza kalea |
| Avenue | Avenida de Europa | Avinguda d'Europa | Avenida de Galicia | Gernika etorbidea |
| Square | Plaza Mayor | Plaça Major | Praza Maior | Foru plaza |
| Floor and door | 3º B | 3r 2a | 3º B | 3. ezk. |
Basque flips the order, with the name before the road word. A parser expecting a road type as the first token misreads every Basque row, which makes these rows the better test. Switch to Castilian only when your system stores a single road type list.
Prefixes 35, 38, 51, and 52 are Spanish addresses outside the EU VAT area. The Canary Islands charge IGIC. Ceuta and Melilla charge IPSI. Goods shipped there from the mainland need customs paperwork, and many carriers price them apart.
A checkout treating every Spanish postal code the same charges the wrong tax on these orders. Select Canarias, Ceuta, or Melilla above and run a full order through your tax rules before launch.
Each postal code range was checked against the GeoNames postal dataset (CC BY 4.0).
Partly. The city, province, and postal code are real and match each other. The street, number, floor, and door are assembled at random, so most rows point at no building. A row might still match a real address by chance, since names like Calle Mayor exist in hundreds of towns.
A format check passes, and so does a check of postal code against province. A lookup against the Correos street database or Google Places will often fail, because the street and postal code come from separate lists. Test against a sandbox with the strict lookup switched off.
Put the recipient first, then road type, street name, number, floor, and door on one line. The next line holds the five-digit postal code and the town, with the province in brackets when the town differs from it. Add España on a last line for mail from abroad.
Third floor, door B. The small o is the ordinal sign, so 3º reads as tercero. Catalan addresses write the same idea as 3r 2a, third floor, second door.
Spaniards carry two surnames, usually one from each parent, and both appear on official documents. A form with one surname field truncates or merges them. Turn the recipient line on to test this case, or off when your form collects names elsewhere.
No. Banks, delivery firms, and government services verify a real address, and giving a false one breaks their terms. Keep these rows to test data, screenshots, and demos.