Random Spain Address Generator

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.

Street language
Address type
How many

Your Spanish addresses

The street, number, and door are random. The city and postal code are real.

  1. Calle de los Olivos 63
    Lucía Navarro Ortega
    Calle de los Olivos, 63, 3º B
    28039 Madrid
    España
    28
    Madrid
    039
    Delivery zone

    C/ de los Olivos, 63, 3º B

  2. Carrer de Sant Joan 27
    Jordi Puig Ferrer
    Carrer de Sant Joan, 27, 2n 1a
    08203 Sabadell (Barcelona)
    España
    08
    Barcelona
    203
    Delivery zone

    C/ de Sant Joan, 27, 2n 1a

  3. Eliza kalea 8
    Ane Etxeberria Ruiz
    Eliza kalea, 8, 4. ezk.
    48992 Getxo (Bizkaia)
    España
    48
    Bizkaia
    992
    Delivery zone

    Eliza k., 8, 4. ezk.

Five Spanish address details that break forms

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.

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.

The º and ª signs

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.

Accents and apostrophes

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.

No street number

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.

Floor and door

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.

How to write a Spanish address

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.

Words and abbreviations in a Spanish address
WrittenMeaningNote
C/Calle, streetINE road code CL
Avda.Avenida, avenueINE road code AV
Pza.Plaza, squareINE road code PZ
PºPaseo, promenadeINE road code PS
s/nSin número, no street numberGoes where the number sits
BajoGround floorOften a shop or a flat with street access
EntresueloMezzanineSits between Bajo and 1º in older buildings
PrincipalFirst raised floorAlso sits below 1º in older buildings
ÁticoTop floorNo number, so a numeric floor field rejects it
Izda. / Dcha.Left and right doorReplaces the door letter on many landings
Local 3Business unit 3Street level premises, no floor or door

Spanish postal code prefixes by province

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.

To 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}$

Street names in Catalan, Galician, and Basque

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.

The same road types in four languages
RoadCastilianCatalanGalicianBasque
StreetCalle MayorCarrer MajorRúa RealEliza kalea
AvenueAvenida de EuropaAvinguda d'EuropaAvenida de GaliciaGernika etorbidea
SquarePlaza MayorPlaça MajorPraza MaiorForu plaza
Floor and door3º B3r 2a3º B3. 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.

Test the Canary Islands, Ceuta, and Melilla apart

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.

Where this generator falls short

Each postal code range was checked against the GeoNames postal dataset (CC BY 4.0).

Frequently Asked Questions

Are these real Spanish addresses?

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.

Will a Spanish address from this page pass validation?

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.

How do you write an address in Spain?

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.

What does 3º B mean in a Spanish address?

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.

Why do Spanish names on the labels have two surnames?

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.

Can I use these addresses to sign up for a Spanish service?

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.