DNI Validator
Enter a Spanish DNI to check whether its control letter is correct.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- Use the Share button to copy a link to your result.
About this calculator
Spain's national identity number, the DNI (Documento Nacional de Identidad), pairs an 8-digit number with a single control (check) letter that guards against typos and forged documents. The letter is derived deterministically: take the 8-digit number, compute its remainder on division by 23, and use that remainder (0–22) as an index into the fixed 23-character string "TRWAGMYFPDXBNJZSQVHLCKE" — the letter at that position is the correct one.
Because the algorithm is public and purely arithmetic, anyone can verify — but not forge new valid numbers from — a DNI's check letter without needing access to any government database, which is why banks, telecom providers and online services performing basic format validation in Spain check this letter locally before accepting an ID number; the same modulo-23 scheme, with a prefix conversion, also validates the foreigner-resident NIE number.
Was this helpful?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)