Skip to content

How it works

The codice fiscale is Italy’s personal tax code. It’s 16 characters long and it’s built from your surname, first name, date of birth, sex and place of birth, following rules set by the Ministry of Finance in 1974 under DPR 605/1973. You need it to sign a rental contract, open a bank account, get a job, see a doctor or register a SIM card.

How the 16 characters are built

Characters Meaning Example (Mario Rossi)
1–3 Surname RSS
4–6 First name MRA
7–8 Year of birth 80
9 Month of birth A
10–11 Day of birth (+40 for women) 01
12–15 Place of birth H501
16 Check character U

Surname and first name

For the surname, take the consonants in order, then the vowels, and add X if there are fewer than three letters. Fo becomes FOX.

For the first name the rule has one twist. If the name has four or more consonants, take the 1st, 3rd and 4th: Francesca (F, R, N, C, S, C) becomes FNC, skipping the R. With fewer consonants, apply the same rule as for the surname.

Accents, apostrophes and spaces are ignored. D’Angelo is read as DANGELO.

Date and sex

The year uses its last two digits. The month is a letter: A B C D E H L M P R S T for January to December. June is H, not F. The day is written with two digits, and for women 40 is added, so a woman born on the 29th has 69.

Place of birth

For people born in Italy this is the codice catastale of the comune (Milano is F205, Roma H501). For people born abroad it’s a code starting with Z that identifies the country (the United States is Z404). Use the comune as it was on your date of birth: if it has since merged or changed name, the old code stays in your codice fiscale.

The check character

The last letter catches typing mistakes. Each of the first 15 characters gets a value from an official table, which differs for odd and even positions. The values are added up, and the remainder after dividing by 26 gives a letter from A (0) to Z (25). The step-by-step breakdown above shows the sum for your own code.

Omocodia: when two people share a code

Two people can end up with the same 15 characters, for example two Mario Rossi born in Rome on the same day. The Agenzia delle Entrate then gives the later one a different code by replacing digits with letters (0 = L, 1 = M … 9 = V), starting from the rightmost digit, and recalculates the check character. That’s why a calculator can’t guarantee your exact official code. We list the possible variants so you can recognise yours.

Where to check your official code

Your codice fiscale is printed on the tessera sanitaria (health card). The Agenzia delle Entrate offers two free online checks: one for the formal correctness of a code, and one that confirms whether a code matches a registered person. Both are linked in the sources.

Worked example

Bianchi Francesca · F · 29/06/1992 · F205

BNCFNC92H69F205F

  1. Surname

    BIANCHI: consonants BNCH, then vowels IAI, then X if needed → BNC

    BNC
  2. First name

    FRANCESCA: consonants FRNCSC. With 4 or more consonants take the 1st, 3rd and 4th; otherwise consonants, then vowels, then X → FNC

    FNC
  3. Year

    Last two digits of 1992 → 92

    92
  4. Month

    Month 6 → letter H (A B C D E H L M P R S T)

    H
  5. Day and sex

    Day 29 + 40 (40 is added for women) → 69

    69
  6. Place of birth

    Codice catastale of the comune, or Z code of the foreign country → F205

    F205
  7. Check character

    Values of the characters of BNCFNC92H69F205 in odd and even positions add up to 135; the remainder of 135 ÷ 26 gives the letter → F

    F

What this tool doesn't do

  • It doesn't assign a code: only the Agenzia delle Entrate does, and a calculated code has no legal value.
  • It can't know whether your official code was changed for omocodia; it lists the possible variants instead.
  • Codes for companies and organisations (11 digits) work differently and aren't covered.

Frequently asked questions

Is a codice fiscale calculated online valid?

No. It's a calculation, not an assignment. Your valid code is the one issued by the Agenzia delle Entrate, printed on your tessera sanitaria or on the AdE certificate. In most cases it matches the calculation, but it can differ in cases of omocodia.

How do foreigners get a codice fiscale?

It is issued by the Agenzia delle Entrate: at one of its offices in Italy, through an Italian consulate abroad, or as part of some procedures, such as applying for a residence permit. For people born abroad, characters 12 to 15 are the Z code of the country of birth.

What if my comune of birth no longer exists or changed its name?

Use the comune as it was when you were born. Former comuni are in the list with the year they ceased (for example Castegnero, until 2026). Your code keeps the old place code for life.

I have two surnames or two first names. What do I enter?

Enter them exactly as on your birth record or passport, with spaces. Spaces, apostrophes and accents are ignored: only the letters count, in order.

Why is my real code different from the result?

Usually because of omocodia: when two people would share a code, the Agenzia delle Entrate replaces one or more digits with letters, starting from the right. Check the list of variants under the result. A typo in the name or the wrong comune is the other common cause.