Spanish DNI Letter Calculator

Enter the numbers of your Spanish DNI or NIE and get the correct check letter instantly. Calculation is done in your browser.

DNI or NIE number

How is the letter calculated?

The DNI number is divided by 23 and the remainder is taken. That remainder (0 to 22) corresponds to a letter according to the official table TRWAGMYFPDXBNJZSQVHLCKE. For the NIE, the initial letter X, Y or Z is replaced by 0, 1 or 2 before calculating.

Frequently asked questions