Structure of the fiscal code
Italy's fiscal code (codice fiscale) is a unique 16-character alphanumeric identifier. It consists of: 3 characters for the surname, 3 for the first name, 2 for the birth year, 1 for the birth month, 2 for the birth day and sex, 4 for the municipality or foreign country of birth, and 1 final check character.
How the surname is encoded
The consonants of the surname are extracted first, then vowels if there are not enough consonants. If the surname has fewer than 3 letters, an X is added. Example: FERRARI → consonants F, R, R → code FRR; ESPOSITO → consonants S, P, S → code SPS.
How the first name is encoded
For names with 4 or more consonants, the 1st, 3rd, and 4th are used. With 3 consonants, all 3 are used. With fewer than 3 consonants, vowels are added (then X). Example: MARIO → consonants M, R → MRA; GIOVANNI → consonants G, V, N, N → GNN (1st, 3rd, 4th).
Date of birth and sex
The birth year uses the last two digits (e.g. 1990 → 90). The birth month uses a letter code: A=January, B=February, C=March, D=April, E=May, H=June, L=July, M=August, P=September, R=October, S=November, T=December.
For the day, men use the actual day (e.g. 5 → 05); women add 40 to the day (e.g. 5 → 45). This allows the sex to be identified from the fiscal code itself.
Municipality code and check character
The municipality code consists of one letter and three digits (e.g. Rome = H501, Milan = F205). For people born abroad, the country code is used (e.g. Germany = Z112). The final check character is calculated using an algorithm that adds up the values of odd and even positions differently, allowing the code's correctness to be verified.