Spanish DNI and NIE letter calculator
The DNI letter, worked out.
Output
Paste or type above to see the result here.
Your files stay on your device
This tool runs entirely in your browser. What you paste is processed on your device and is never sent to a server, so it is safe to use with tokens, keys and unpublished text.
How it works
- Paste one number a line; dots, dashes and spaces are fine.
- Each is checked for its length and its check digits.
- The result shows each step of the calculation, and where a number fails.
Frequently asked questions
- How is the DNI letter calculated?
- Divide the eight digits by 23 and take the remainder: 0 is T, 1 is R, 2 is W … 22 is E. 12345678 ÷ 23 leaves 14, the letter Z.
- And a NIE?
- An NIE starts with X, Y or Z, which count as 0, 1 and 2 in front of the seven digits; then the same rule gives the letter.
- Does a valid check digit mean the number exists?
- No — only that it is correctly written. Whether it was issued, and to whom, only the issuing authority can say. The checker never makes up numbers either: it checks the ones you type.
- Is anything uploaded?
- No. The check is worked out in your browser, and nothing you type leaves your computer.