How Codice Fiscale Verification Works
Formal verification checks every element against the official algorithm rules (D.M. 12/03/1974):
1. Structure and Length
The CF must be exactly 16 alphanumeric characters. Positions 1-6 must contain letters, positions 7-8 digits, position 9 a letter, positions 10-11 digits, positions 12-15 a letter followed by three digits, and position 16 a letter. Homocode variants may have letters in digit positions.
2. Check Digit Validation
Check digit algorithm: 1. For each character at odd position (1,3,5,…,15): value from ODD table 2. For each character at even position (2,4,6,…,14): value from EVEN table 3. Total sum modulo 26 → letter A-Z (A=0, B=1, … Z=25) 4. Compare with the 16th character
3. Belfiore Code Validation
The code at positions 12-15 is looked up in a database of 7,900+ Italian municipalities (including historic/suppressed ones) and 150+ foreign countries. An unrecognized code is flagged.
4. Date Consistency
The month (position 9) must be one of A, B, C, D, E, H, L, M, P, R, S, T. The day (positions 10-11) must be 01-31 (male) or 41-71 (female).