Skip to content
Italian tax code

Codice fiscale decoder: what an Italian tax code tells you

Paste the 16 characters and read the holder's sex, date of birth and Italian town of birth, or the country for people born outside Italy. The decoder recomputes the check letter at the end and understands omocodia codes, where some digits were replaced by letters. It tells you whether a code is well formed; whether it was actually issued to someone is something only the Agenzia delle Entrate can confirm.

Updated on · by

Your result will appear here

Place list from ANPR, updated November 3, 2026: 7,894 current comuni and 1,970 that no longer exist.

How to decode a codice fiscale

  1. 1

    Paste the code

    Type or paste the 16 characters. Spaces and lower case do not matter: they are removed before the code is read.

  2. 2

    Press Decode

    The decoder checks that letters and digits are in the right places and recomputes the check letter from the first 15 characters.

  3. 3

    Read the result

    You get the sex, the date of birth and the place code with the name of the Italian comune or of the country. A comune that has since been abolished is marked as such.

  4. 4

    Omocodia codes

    If some digits were swapped for letters, the decoder reads them back as digits and also shows the base form of the code.

How an Italian tax code is built

Every person registered with the Italian tax authority, the Agenzia delle Entrate, has a codice fiscale: 16 letters and digits printed on the tessera sanitaria (the health insurance card) and asked for by employers, landlords, banks and public offices. Foreign citizens get one too when they deal with Italian taxes or administration, and the code is built from their personal details in exactly the same way.

Characters 1 to 6. Three letters from the surname and three from the first name, mostly consonants. They are a fingerprint of the name, not the name itself: RSS fits Rossi, Russo and Rossetti alike.

Characters 7 and 8. The last two digits of the year of birth. The century is not written anywhere, so the decoder picks the most recent year that is not in the future: 99 becomes 1999, 05 becomes 2005.

Character 9. The month, as a letter: A January, B February, C March, D April, E May, H June, L July, M August, P September, R October, S November, T December.

Characters 10 and 11. The day of birth, which also gives the sex. Men keep the day as it is, from 01 to 31. Women have 40 added, so their day runs from 41 to 71: a woman born on the 15th shows 55.

Characters 12 to 15. The place of birth. For people born in Italy it is the cadastral code of the comune, one letter and three digits (H501 is Rome, F205 is Milan). For people born abroad it is the code of their country, always a Z followed by three digits: Z404 for the United States, Z114 for the United Kingdom, Z602 for Brazil. A comune that was later merged or renamed keeps its old code in the tax codes of the people born there.

Character 16. The check letter, computed from the first 15 characters with two conversion tables (one for odd positions, one for even ones) and the remainder of a division by 26. It catches typing mistakes. It does not catch invented codes: anyone who knows the rule can build a code with a correct last letter.

Omocodia. When two people would end up with the same code, the Agenzia delle Entrate changes one of them by replacing one or more of its seven digits with letters (L for 0, M for 1, N for 2, P for 3, Q for 4, R for 5, S for 6, T for 7, U for 8, V for 9), starting from the right, and computes a new check letter. The decoder turns those letters back into digits and reads the code as if nothing had been replaced.

Every Italian comune, including the ones that no longer exist

The decoder reads place codes against the full list kept by ANPR, the national population register: the comuni that exist today and the ones that were abolished, merged or renamed, each marked as such. People born in a town that has since disappeared still carry its code, and a decoder limited to today's comuni would leave them with an unknown place.

Countries come from the same register: the Z codes of foreign states, including some states that no longer exist.

Glossary

Technical terms used on this page, briefly explained.

Codice fiscale #
The Italian personal tax code: 16 letters and digits built from name, date and place of birth, issued by the Agenzia delle Entrate.
Cadastral code #
One letter and three digits identifying an Italian comune, also called the Belfiore code. It fills characters 12 to 15 of the tax code.
Foreign country code #
For people born outside Italy the place of birth is a country, written as Z followed by three digits.
Check letter #
The 16th character, computed from the first 15. A character copied wrong usually breaks it.
Omocodia #
The replacement of digits with letters that the Agenzia delle Entrate applies when two people would have the same tax code.

Questions about decoding an Italian tax code

What is a codice fiscale and who has one?
It is the personal tax code issued by the Agenzia delle Entrate, Italy's tax authority. Italian citizens get it at birth; foreign citizens get one when they need it in Italy, for example to work, sign a lease or open a bank account. It is the number the Italian administration uses to identify a person in tax matters.
Why does my codice fiscale contain a Z?
Because you were born outside Italy. Characters 12 to 15 hold the code of the place of birth, and for people born abroad that place is a country, written as Z plus three digits: Z404 is the United States, Z114 the United Kingdom, Z602 Brazil. The decoder shows the country's name.
Is the codice fiscale the number on the tessera sanitaria?
Yes. The tessera sanitaria, the card of the national health service, carries the holder's codice fiscale, also as a barcode. It is the same code, not a separate health number.
Can I find out someone's name from their codice fiscale?
No. The code keeps three letters of the surname and three of the first name, usually consonants, and many names share them. If you already know the name and the birth details you can do the opposite check: generate the code from the data and compare.
How do I check that a codice fiscale was really issued?
This decoder checks that the code follows the rules; it cannot know whether the Agenzia delle Entrate assigned it to anyone. The agency runs a free tax code verification service (in Italian) that tells you whether a code is valid and, if you enter the personal details, whether it matches the person.
My code has letters where numbers should be. Is it wrong?
Probably not. It is an omocodia code: the agency replaces digits with letters (L, M, N, P, Q, R, S, T, U, V) when two people would otherwise share a code. The letters can appear in characters 7, 8, 10, 11, 13, 14 and 15. The decoder reads them as digits and shows the base form of the code.
What do the month letters mean?
Character 9 is the month of birth: A January, B February, C March, D April, E May, H June, L July, M August, P September, R October, S November, T December. Any other letter in that position means the code is not valid.
Why is the day of birth above 40?
Because the holder is a woman. The code has no separate field for sex: for women, 40 is added to the day of birth, so 41 means the 1st of the month and 71 the 31st. Days from 01 to 31 belong to men.
Is the codice fiscale the same as a partita IVA?
Not for a person. A person's codice fiscale has 16 characters; the partita IVA is the 11-digit VAT number of a business or a self-employed professional. Companies and other organisations have an 11-digit codice fiscale too, and for many of them it is the same number as their partita IVA.
The check letter is right: does that prove the code is real?
No. The last letter is there to catch typing mistakes such as a wrong digit or two swapped characters. A made-up code built by someone who knows the rule has a correct check letter too. Only the agency's verification service can tell you that a code was issued.

Sources used

Laws, official tables and reference implementations the logic of this tool was checked against.

Does your software get Italian tax codes wrong?

If your sign-up form, HR system or e-commerce checkout rejects valid codes, misses omocodia or fails for people born abroad, I can put a correct tax code validation into your PHP, Laravel, Symfony or Node backend.

Tell me about your system