Address
- Street address
- 7270 Gran Vía
- City
- Málaga
- Region
- Andalucía (AN)
- Postal code
- 29073
- Country
- Spain
Spanish postal codes are five digits whose first two identify one of the fifty-two provinces, numbered alphabetically. The DNI is one of the few national identity numbers with a checksum simple enough to implement in a single line — and therefore one worth actually validating in your test suite.
Mohammed Wilson
{
"countryCode": "ES",
"country": "Spain",
"firstName": "Mohammed",
"lastName": "Wilson",
"fullName": "Mohammed Wilson",
"gender": "Male",
"birthday": "11/08/1973",
"birthdayISO": "1973-08-11",
"streetAddress": "7270 Gran Vía",
"city": "Málaga",
"state": "Andalucía",
"stateAbbr": "AN",
"zip": "29073",
"phone": "+34 61 363 577",
"email": "mohammed.wilson50@example.org",
"job": "Full Stack Developer",
"company": "Forge Innovations",
"nationalId": "55419231H",
"nationalIdLabel": "DNI",
"ipv4": "203.0.113.93",
"mac": "D2:BD:E7:0C:AF:27",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
}Test data only. This record describes no real person. Numbers are drawn from ranges reserved so they can never be assigned, and the address is not deliverable. Using synthetic data to impersonate anyone, open or verify an account, or evade identity checks is prohibited — see the terms.
17 autonomous communities plus Ceuta and Melilla, subdivided into 50 provinces. The province is written on its own line when it differs from the city name.
| Local name | código postal |
|---|---|
| Format | 5 digits |
| Example | 28013 |
| Country code | +34 |
|---|---|
| Numbering plan | Spanish Numbering Plan |
| Example | +34 612 34 56 78 |
| Identifier | DNI |
|---|---|
| Example shape | 12345678Z |
The identity numbers this page generates match the documented digit pattern so that form validation can be tested. They are not issued numbers, they correspond to no person, and they will not resolve against any authority.
The generator draws from these cities. Each is paired with the autonomous communities and province it is actually in, and with the código postal prefix that area really uses — so a generated record is internally consistent rather than three unrelated values stuck together.
| City | Autonomou | Código postal prefix |
|---|---|---|
| Madrid | Comunidad de Madrid MD | 280 |
| Barcelona | Cataluña CT | 080 |
| Valencia | Comunidad Valenciana VC | 460 |
| Sevilla | Andalucía AN | 410 |
| Málaga | Andalucía AN | 290 |
| Zaragoza | Aragón AR | 500 |
| Bilbao | País Vasco PV | 480 |
| Murcia | Región de Murcia MC | 300 |
| Valladolid | Castilla y León CL | 470 |
Take the eight-digit number modulo 23 and use the remainder as an index into TRWAGMYFPDXBNJZSQVHLCKE. So 12345678 mod 23 gives 14, and the fifteenth character of that string is Z. It is trivial to implement, which means Spanish forms genuinely do validate it — and test data that ignores the rule will be rejected.
Spanish addresses commonly append a floor and door to the street line, written as 3º B for third floor, door B. Piso, puerta, escalera and planta all appear in real addresses, so an address parser aimed at Spain needs to handle them.
It is included when the province differs from the city — Correos uses it for disambiguation. When the city is the provincial capital and shares its name, the line is usually omitted.
Not as a separately dialled prefix. Since 1998 the full nine digits are always dialled, with the former provincial code absorbed into the number. A form that asks Spanish users for an area code separately is asking a question that no longer has an answer.