Codice fiscale calculator and checker
The codice fiscale is the Italian tax number (like a TIN): you need it for almost everything - the KIT, a bank, a lease, insurance. This tool builds the code with the official algorithm and explains each part. It is an UNOFFICIAL aid: the only valid codice fiscale is the one issued by the Agenzia delle Entrate. This is not legal advice.
What the codice fiscale is and how a foreigner obtains one is in the guide: codice fiscale for foreigners.
How the code is built (16 characters)
- 3 - surname: consonants, then vowels, padded with X.
- 3 - name: with 4+ consonants take 1st, 3rd, 4th; otherwise like the surname.
- 2 - last two digits of the birth year.
- 1 - month letter: A B C D E H L M P R S T (Jan..Dec).
- 2 - birth day; for women the day + 40.
- 4 - the Belfiore birthplace code (country Z-code or Italian comune code).
- 1 - check character (odd/even position tables + mod 26).
Learn more: codice fiscale, residenza and tessera sanitaria ->
Blanks and samples in the materials hub ->
This is an unofficial helper, not legal advice. Only the Agenzia delle Entrate issues a valid codice fiscale; it can often be requested in advance through an Italian consulate (esteri.it) or obtained in Italy. Country Belfiore codes are revised occasionally - verify current on agenziaentrate.gov.it.
What is the codice fiscale (Italian tax code)
The codice fiscale is Italy's 16-character personal tax code, similar to a TIN or SSN as an identifier. It is assigned once, for life, and you need it for almost anything in the country: an employment contract, a lease, a bank account, a SIM card, a doctor appointment, filing the permesso di soggiorno KIT. The code proves neither a visa nor a right to stay - it is only an identifier in the tax registry.
The format: how the 16 characters are built
The code is not random - it is derived deterministically from your surname, name, sex, date and place of birth. That is exactly why the calculator above can reproduce it.
Characters 1-6: surname and name
Three letters each for surname and name: consonants first, then vowels; short words are padded with X. The name has a special rule: with four or more consonants, the 1st, 3rd and 4th are taken. Everything uses the Latin spelling - as in your passport.
Characters 7-11: date of birth and sex
The last two digits of the year, a month letter (A = January ... T = December) and the day of birth; for women 40 is added to the day, so 41-71 means female. This is where sex is encoded.
Characters 12-15: place of birth (Belfiore code)
A four-character Belfiore code: for those born in Italy - the comune code (e.g. H501 = Rome), for those born abroad - the country Z-code (e.g. Z154 = Russia). Country codes are occasionally revised - the current table lives on agenziaentrate.gov.it.
Character 16: the check character
The final letter is computed from the first 15 via the odd/even position tables and mod 26. It catches typos: a mistyped code almost always fails the check-character test.
How to get the official codice fiscale
The only body that assigns a valid code is the Agenzia delle Entrate (the Italian revenue agency). In Italy it is free: an application (form AA4/8) plus your passport at any office; the paper certificate is usually issued on the spot. From abroad, you request the code through an Italian consulate (esteri.it) - handy if you need it before moving. For visa D or permesso applicants the code is often assigned automatically along the Sportello Unico / questura chain.
Why an online calculator is only an estimate: in an omocodia case (two people sharing all 15 characters) the Agenzia delle Entrate gives the second person an altered code - some digits become letters and the check character is recomputed. No algorithm can predict that, so our tool is an algorithm demo and a self-check aid, not a source of the official code.
Codice fiscale for foreigners and non-residents
A foreigner and even a non-resident can get the code: it is needed, for example, to buy property, handle an inheritance or open an account. The document base is a passport and the completed form; non-EU citizens inside Italy may be asked for a basis of stay (visa, permesso or ricevuta) - per community experience, offices differ, so check your own case. To see what belongs in your document pack for your motivo, try the document-pack builder; how the code ties into residency and the health card is covered in codice fiscale, residenza and tessera sanitaria, and related certificates and legalization live in the Documents section.
FAQ
Is a codice fiscale generated by an online calculator valid?
No. Any online calculator (ours included) only reproduces the algorithm and shows what the code will most likely be. Only the code assigned by the Agenzia delle Entrate is legally valid: in an omocodia case (two people sharing all 15 characters) the agency issues an altered code that no calculator can predict. Always verify against your issued document.
How does a foreigner get the official codice fiscale?
In Italy - free of charge at any Agenzia delle Entrate office with an application (form AA4/8) and your passport; from abroad - through an Italian consulate (esteri.it). For visa D or permesso applicants the code is often assigned automatically along the way (Sportello Unico / questura) - community experience, check your own case.
Can a non-resident get a codice fiscale without living in Italy?
Yes. Residency or a visa is not required for the code itself: non-residents apply through an Italian consulate in their country or in person at an Agenzia delle Entrate office - for example to buy property, open an account or sign a contract. You need a passport and the completed form; timing and details vary by consulate.
Does the codice fiscale change or expire?
The code is assigned once and does not expire. It changes only in special cases - an official name change or an omocodia correction. The plastic card (usually combined with the tessera sanitaria) has an expiry date, but the code on it stays the same.
How do I check that a codice fiscale is correct?
Formally - recompute the check character: enter the data in the calculator above and compare part by part. Officially - via the codice fiscale verification service on the Agenzia delle Entrate website: it confirms the code actually exists in the registry, not just that it is mathematically well-formed.
Where do I find my tax ID number (codice fiscale) in Italy?
It is printed on the tessera sanitaria: the health card issued to people registered with the SSN also carries the codice fiscale; people not registered with the SSN get a separate tesserino del codice fiscale. For foreigners the code is usually assigned by the questura or the Sportello Unico when they apply for a permesso, and right after assignment you get a certificato di attribuzione to use until the card arrives by post. A copy of your current tessera sanitaria can be viewed and printed in the Agenzia delle Entrate personal area. Source: the 'Codice fiscale e tessera sanitaria' section on agenziaentrate.gov.it, checked 05.10.2026.
Is the partita IVA (VAT number) the same as the codice fiscale?
No. A person's codice fiscale has 16 letters and digits derived from surname, first name, date and place of birth. The partita IVA is a separate 11-digit code assigned to those who carry out an economic activity (sole traders, freelancers, companies). The codice fiscale of organisations also has 11 digits, so an 11-digit number is a company code or a partita IVA, not a personal code. Source: the pages on the codice fiscale, the partita IVA and form AA5/6 on agenziaentrate.gov.it, checked 05.10.2026.
Do people born abroad have a codice fiscale, and which country code does it use?
Yes. Characters 12 to 15 are the place of birth: for people born in Italy the comune code, for people born abroad the code of the foreign country, which starts with Z (Russia - Z154, Ukraine - Z138, Belarus - Z139, Moldova - Z140). On form AA4/8 you write the name of the country as the place of birth and EE in the province box. Foreigners get the code from the questura or the Sportello Unico, people living abroad from an Italian consulate. Source: the FAQ and the form AA4/8 instructions on agenziaentrate.gov.it, country codes from our calculator's table; checked 05.10.2026.
From the community chats: the codice fiscale
Regarding the driver's license and codice fiscale, when buying a car from a dealership, check which code they register the car under. I didn't check and ended up with the driver's license and the car registered under different codes. I only found out about this when moving, when I re-registered my address. As a result, I spent a lot of time and money fixing the situation. So it's better to check everything in advance!
I also have a student residence permit. When I signed the employment contract, I was asked for the tessera, but they accepted just a paper document with the codice. Italians require the tessera for the codice fiscale, as the card is more convenient, but its main function is to have the codice fiscale. I bought a transit ticket without problems; I don't remember if I showed the residence permit or passport, but definitely not the tessera.
I have a similar situation: the permesso has one codice fiscale, while the carta d'identita and tessera sanitaria have another. The birth certificate from the USSR does not appear in the system, so they assign the codice - RF. All other documents are fine, and it creates confusion. I worked under the second codice fiscale. I applied for the renewal of the permesso and indicated the discrepancies, but I don't know what will come of it.
Where people most often go wrong
- Errors in the codice fiscale can lead to the need to correct documents at the agenzia delle entrate or the consulate. (6 messages)
- It is necessary to monitor the consistency of the place of birth and other data in the documents to avoid confusion with the codice fiscale. (5 messages)
Rephrased from open chats of Russian-speaking expats in Italy, with names and identifying details removed. This is lived experience, not legal advice: check rules and figures on the official sites.
What the community asks
- How do you calculate or decode a codice fiscale online?
- How do you get a codice fiscale?
- Do you need a codice fiscale for an Italian SIM card?
Short answers from community experience are on the FAQ page.