Skip to main content

Italy Codice Fiscale Generator

Generate and format valid Italian Codice Fiscale (Tax Code) numbers for QA and development.

Waiting for generation...

About Italy Codice Fiscale

The Codice Fiscale is the personal tax identification number assigned to citizens and residents in Italy by the Agenzia delle Entrate (DPR 605/1973 and DM 23/12/1976).

It consists of 16 alphanumeric characters (LLLLLLNNLNNLNNNL) encoding surname (3 letters), first name (3 letters), birth year (2 digits), birth month (1 letter A-T), day and gender (+40 for females), cadastral municipality code (Belfiore), and a check character (CIN) computed via Modulo 26.

Anatomy & Structure of Italian Codice Fiscale (16 Characters)

The Italian Fiscal Code comprises 16 alphanumeric characters distributed across 6 functional blocks:

PositionFieldLengthMeaning & RuleExample
1 to 3Surname (Cognome)3 lettersFirst 3 consonants of family surnameRSS
4 to 6First Name (Nome)3 letters1st, 3rd and 4th consonants of first name (or first ones if < 4)MRA
7 & 8Birth Year2 digitsLast 2 digits of the birth year85
9Birth Month1 letterAlphabetic month code (A to T, skipping non-standard letters)M
10 & 11Day & Gender2 digitsDay of birth: 01-31 for males; 41-71 for females (+40)01
12 to 15Cadastral Code (Belfiore)4 charsBelfiore code identifying birth municipality or foreign countryH501
16Control Character (CIN)1 letterChecksum letter derived via Modulo 26 with odd/even weight tablesQ

Codice Fiscale Validation Algorithm (Modulo 26 CIN)

The Agenzia delle Entrate determines the CIN character via separate odd and even character weights:

CIN = char(65 + (sum(odd_weight(c_i)) + sum(even_weight(c_j))) % 26)
  1. 1. Extract the first 15 characters of the code (0-indexed 0 to 14).
  2. 2. For characters at odd positions (1st, 3rd, 5th... index 0, 2, 4...), map using the official odd weights table.
  3. 3. For characters at even positions (2nd, 4th, 6th... index 1, 3, 5...), map using the official even weights table.
  4. 4. Sum all mapped weight values.
  5. 5. Compute the remainder modulo 26: Remainder = Total % 26.
  6. 6. The 16th character must match the letter corresponding to the remainder (0=A, 1=B, ..., 25=Z).

Frequently Asked Questions (FAQ)