Vai al contenuto
CF Inverso

English guide

Italian tax code (codice fiscale): calculator and how to get the official one

The codice fiscale is the 16-character identifier every person needs in Italy to sign a lease, open a bank account, enrol at university, get a phone contract or see a doctor. Here you can calculate what yours will look like and learn where to request the official one. Your data never leaves your browser.

Questa pagina esiste anche in italiano: Calcolo del codice fiscale.

Calculator form

As written on your passport or ID, accents and apostrophes included.

All given names if you have more than one (e.g. “Anna Maria”).

Sex

The algorithm needs it for the day block (40 is added for women).

Date of birth
Place of birth

Includes abolished municipalities: search by the name it had when you were born.

Your data stays in your browser

What the 16 characters mean

Unlike a random ID, the Italian tax code is built from your personal data with a public rule set out in a 1976 ministerial decree. That is why it can be calculated in advance and why, read backwards, it reveals sex, date and place of birth, but not your name.

Struttura del codice fiscale: i 16 caratteri divisi in sette blocchiCognome: caratteri 1-3. Nome: caratteri 4-6. Anno: caratteri 7-8. Mese: caratteri 9. Giorno e sesso: caratteri 10-11. Luogo: caratteri 12-15. Controllo: caratteri 16. 12345678910111213141516RSSMRA80A01H501UCognomepos. 1–3Nomepos. 4–6Annopos. 7–8Mesepos. 9Giorno e sessopos. 10–11Luogopos. 12–15Controllopos. 16
A fictional example. Surname and first name contribute three letters each (mostly consonants); then two digits for the year, a letter for the month, two digits for the day (plus 40 for women), four characters for the place of birth and a final check letter.
  • Surname (1–3): the consonants in order, then vowels if needed, padded with X.
  • First name (4–6): same rule, except that with four or more consonants the 1st, 3rd and 4th are used.
  • Year (7–8): the last two digits. The century is not stored.
  • Month (9): a letter from a fixed table: A B C D E H L M P R S T for January to December.
  • Day and sex (10–11): the day of birth; 40 is added for women, so 01–31 means male and 41–71 female.
  • Place (12–15): the cadastral code of the Italian municipality, or Z plus three digits for a foreign country.
  • Check character (16): computed from the other fifteen; it catches typing errors.

How to get the official codice fiscale

The code is assigned only by the Agenzia delle Entrate, directly or through other public offices, and it is free. Which office depends on your situation; the rules below are published by the Italian Ministry of Foreign Affairs and the Agenzia delle Entrate.

Your situationWho assigns the code
Non-EU national entering Italy for work or family reunificationThe Sportello Unico per l'Immigrazione at the Prefettura, as part of the entry clearance (nulla osta).
Non-EU national applying for or renewing a residence permit for other reasonsThe Questura (police headquarters), which is connected to the tax registry and assigns the code if you do not have one.
EU citizen moving to ItalyAny local office of the Agenzia delle Entrate: form AA4/8, passport or national ID valid for travel, and the reason for the request.
Foreign student (stay up to 90 days)Any Agenzia delle Entrate office; for stays over 90 days you need a residence permit, and the Questura issues the code with it.
Living abroad and needing a code (inheritance, buying property, contracts)The Italian consulate in your country of residence, or a representative in Italy with a special power of attorney (procura speciale) at an Agenzia office.
Italian citizen registered abroad (AIRE)The consulate, including online through the Fast It portal, where the attribution certificate can be downloaded.

Documents: form AA4/8 (“Domanda di attribuzione codice fiscale…”), filled in and signed, plus a valid passport (with visa where required), residence permit, or an identity certificate issued by your country's diplomatic representation in Italy. The office issues an attribution certificate on the spot; the plastic card (health card for people registered with the national health service, otherwise a tax code card) is mailed to the address you give, so make sure it is correct. The Agenzia's own guide states that form AA4/8 can also be sent by e-mail or certified e-mail (PEC) to an office, with a copy of your ID attached.

Sources: Ministry of Foreign Affairs – Codice fiscale (in Italian); Agenzia delle Entrate – Mini guide to the tax code for foreigners (PDF available in English and 17 other languages).

Why the official code may differ: omocodia

Because the code is derived from personal data, two people can end up with the same 16 characters. When that happens the Agency replaces one or more digits in the second person's code with letters (0→L, 1→M … 9→V), starting from the right, and recalculates the check character. No calculator can know whether this applies to you: the official code is the one on your card or certificate. People born abroad are more often affected, because conventional birth dates (1 January) and transliterated names increase the chance of collisions.

Checking a code

The Agenzia delle Entrate offers a free online service to check whether a tax code exists and one to check that a code matches a person's data. Both answer only yes or no. CF Inverso has no authorised integration with the tax registry and does not query the official service on your behalf: use the linked government service yourself. This site's own formal checker (in Italian) verifies the structure and the check character locally.

Privacy

Everything is computed in your browser. The site only downloads public tables (municipalities, countries); the data you type is never sent, stored or logged. There are no cookies and no trackers. See the privacy policy (in Italian).

Frequently asked questions

Is the code produced here my official codice fiscale?

No. It is the code the official algorithm would produce from the data you entered. Only the Agenzia delle Entrate (Italian Revenue Agency) assigns tax codes. In most cases the two coincide, but if someone else already has the same 16 characters the Agency assigns a variant (omocodia), and if the registry holds slightly different data (a middle name, a different spelling) the official code differs. Use this tool to prepare a form or check a transcription, not as proof.

I was born outside Italy. Which place do I enter?

Switch to “Outside Italy” and search for your country of birth: the code uses a Z followed by three digits instead of a municipality code. Citizenship does not matter: an Italian citizen born in London has the code for the United Kingdom; a British citizen born in Rome has the code for Rome.

Does the tax code cost anything?

No. The codice fiscale is free. Anyone charging for “getting your codice fiscale” is charging for filling in a free form.

Can I find someone's codice fiscale from their name?

No. There is no public register. The code can only be calculated from the full personal data (name, surname, sex, date and place of birth) and then verified on the official service, which answers yes or no without revealing anything else.

My name has letters that don't exist in Italian.

Accented letters are reduced to the base letter (ö → O, ñ → N); a few Latin letters have a conventional transliteration (ß → SS, Ø → O, Æ → AE). Names in non-Latin scripts cannot be encoded directly: the Agency uses the transliteration printed on your passport, so enter that.

About this page

Written and reviewed in English, not machine-translated. Editorial review: . CF Inverso is an independent information service and is not affiliated with the Agenzia delle Entrate. Municipality and country codes come from ISTAT and the Italian Ministry of the Interior (ANPR), CC BY 4.0.