Generate a test Spain Documento Nacional de Identidad
A Spanish DNI/NIF is eight digits followed by a control letter, formatted 00000000-A. The letter is derived from the number modulo 23. These test values are synthetic but carry a valid control letter.
Synthetic · not collision-guaranteed Validate a number →
62707394-X
Synthetic DNI with a valid control letter. Not a real issued document.
Format specification
| Identifier | Documento Nacional de Identidad (DNI / NIF) |
|---|---|
| Country | 🇪🇸 Spain |
| Format | 00000000-A |
| Length | 9 characters |
| Checksum | Mod 23 letter |
| Example | 71003203-H |
| Safe strategy | Synthetic |
| Data quality | Verified against sources |
Validation regex
Matches the canonical value — strip separators and uppercase first: value.replace(/[^A-Za-z0-9]/g, '').toUpperCase()
^\d{8}[A-Z]$ References
Common questions
Will these pass my validation?
Yes — they are well-formed Documento Nacional de Identidad values (00000000-A) and pass standard format checks, including the Mod 23 letter checksum.
Could one belong to a real person?
These are synthetic values. They are format-valid but not drawn from a guaranteed reserved range, so use them only for testing.
Can I generate many at once?
Increase the count, or use the free API and CSV/JSON export for large datasets.
For software testing only. These numbers are synthetic and must never be used
for real-world identification, applications, or to impersonate anyone.