Italy Codice Fiscale Validator

Validate an Italian tax code with full checksum verification and decoded birth data.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

The Codice Fiscale (CF) is Italy’s 16-character tax identification code. It is not a random string: every character encodes something about the holder — three letters from the surname, three from the first name, the year and month of birth, the day of birth and gender, a four-character code for the comune or country of birth, and a final check character computed with an official cryptographic table. This validator unpacks every one of those fields and tells you, independently, whether each one is correct or not — along with the decoded date of birth, gender, and Belfiore code.

Structure of the 16 characters

R  S  S  M  R  A  8  5  T  1  0  A  5  6  2  S
1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16
PositionsNameContent
1–3Surname codeConsonants from surname (then vowels, then X padding)
4–6Name codeFirst-name consonants (special rule for 4+ consonants)
7–8Birth yearLast two digits of the year
9Birth monthLetter: A=Jan B=Feb C=Mar D=Apr E=May H=Jun L=Jul M=Aug P=Sep R=Oct S=Nov T=Dec
10–11Birth day + gender01–31 for males; 41–71 for females (real day = value − 40)
12–15Belfiore code1 letter + 3 digits identifying the comune or country of birth
16Check characterComputed via the Agenzia delle Entrate odd/even table

How the check character is computed

The algorithm was published in the Ministerial Decree of 23 December 1976 and has not changed since. Steps:

  1. Take the first 15 characters of the CF exactly as written (including any omocodia letter substitutions).
  2. For each character at an odd position (1, 3, 5 … 15) look it up in the non-sequential odd-position table — for example, digit 0 scores 1, letter A scores 1, letter B scores 0, letter W scores 22.
  3. For each character at an even position (2, 4, 6 … 14) look it up in the sequential even-position table — each digit maps to its face value, and letters map A=0, B=1 … Z=25.
  4. Sum all 15 values, take the result modulo 26, and map 0→A … 25→Z.
  5. That letter must match position 16.

This validator implements the table exactly as published. It also handles omocodia — when the same code would otherwise be assigned to two people, the Agenzia replaces digits at seven positions with the letters L M N P Q R S T U V (L=0 through V=9). The check character is computed on the omocodia form; the date is decoded on the digit form.

Format example (obviously fake)

The sample code RSSMRA85T10A562S is the standard example used in Italian government documentation and technical references. Breakdown:

  • RSS — surname code
  • MRA — name code
  • 85 → birth year 1985
  • T → December
  • 10 → day 10, male (value ≤ 40)
  • A562 → Belfiore code for a comune
  • S → check character (computed sum mod 26 = S, valid)

Do not use real personal Codice Fiscale codes for testing. Use the example above or generate one from obviously fictitious name/date data.

Why field-level validation matters

Most CF validators give a single pass/fail result. That is useful for catching clean typos but unhelpful when a code has been hand-transcribed: you need to know which character is wrong. This tool validates each of the seven structural fields independently — so if only the month letter is wrong, you see a red flag on field 4 and a green tick on fields 1–3 and 5–7.

Ad placeholder (rectangle)