Spanish Fiscal Identity Number
Spanish Fiscal Identity Number ("Número de Identificación Fiscal", or "NIF" in Spanish) consists of eight digits followed by a check letter for Spanish people with DNI, or a letter, seven digits and a check letter for the rest of individuals.
If we restrict ourselves to DNI, the check letter is one of the following 23 uppercase letters:
That is, all the letters from A to Z except I, O and U. Letters I and O are not used to avoid confusion with the numbers 1 and 0, and U is not used so that the total number of letters is 23, which is a prime number and better suited to calculate the check letter.
In order to calculate this letter, we must take the DNI number modulo 23 (that is, calculate the remainder on division of that number by 23), and use that result in the following table:
If you want to see the NIF letter corresponding to a given DNI, please enter the number here: