DNI generatorGenerador de DNI

Valid test Spanish national identity numbers (Documento Nacional de Identidad) for Spain, with the correct structure and check digits. Generate up to 100 at once, copy them or download a CSV, and check any DNI against the rules. Everything runs in your browser.

  1. 13232374Z
  2. 89978991R
  3. 77224856X
  4. 10295390S
  5. 60319016K
  6. 48884369P
  7. 23145913R
  8. 21182057T
  9. 27648616V
  10. 08673362Q
Type or paste a number

Checked in your browser against the published rules. Nothing is sent anywhere, and a valid result does not mean the number was ever issued.

Synthetic test values for software testing. Not issued by any authority and not linked to any person or company.

How a DNI is built

Pattern: 12345678Z

Eight digits and a control letter: the number modulo 23 indexes TRWAGMYFPDXBNJZSQVHLCKE.

Valid and invalid example

ValueResult
13232374ZValid
13232374AInvalid last character changed

About the DNI

Spain’s Documento Nacional de Identidad carries an eight-digit number with a control letter. The letter is the number modulo 23, looked up in the sequence TRWAGMYFPDXBNJZSQVHLCKE. The same number with its letter is the person’s NIF for tax purposes.

Typical test cases: Spanish checkout and registration forms, e-commerce, banking, insurance quotes and any field labelled DNI, NIF or documento.

More sample DNI numbers

89978991R · 77224856X · 10295390S · 60319016K · 48884369P · 23145913R · 21182057T · 27648616V · 08673362Q

Common questions

How is the DNI letter calculated?
Divide the eight-digit number by 23 and take the remainder (0–22). The letter at that position in TRWAGMYFPDXBNJZSQVHLCKE is the control letter. For 12345678 the remainder is 14, which gives Z.
Are these real DNI numbers?
They follow the published structure and pass the check-digit rule, so validators accept them. They are generated at random and are not taken from any register. A random value can still coincide with a number issued to someone, so use them only in test systems.
Can I use a generated DNI on a real application?
No. Using an identity or tax number that is not yours on a real application, tax return or bank form is fraud in most countries. These values are for developers and testers working on their own systems.

Related tools

Other personal ID formats

SSN (US) · ITIN (US) · NINO (GB) · SIN (CA) · CPF (BR) · CURP (MX) · RFC (MX) · NIR (FR) · Codice fiscale (IT) · Steuer-ID (DE) · BSN (NL) · Rijksregisternummer (BE) · NIF (PT) · PESEL (PL) · all formats

Sample profiles with a DNI

Test people for Spain, each with a generated DNI and a drawn profile picture.

  • María Luisa GodoyFemale, 66 · born 1960-02-15Campolongo, La CoruñaDNI 93103624Smariagodoy@example.com
  • Sergio ArenasMale, 30 · born 1996-08-24Valverde De Curueño, LeónDNI 86242163Ysergioarenas@example.net
  • Florencia MezaFemale, 27 · born 1998-10-13Las Mestas, AsturiasDNI 01978346Rflorenciameza@example.net
  • Victoria HinojosaFemale, 52 · born 1974-05-09Zarzuela De Galve, GuadalajaraDNI 32206814Yhinojosa.victoria@example.net

Synthetic people with drawn pictures: not real individuals. Generate more profiles.