Without a codice fiscale in Italy you cannot open a bank account, sign a rental contract or register with a doctor. The good news is that the process is simpler than it looks, but it changes a lot depending on who you are: an Italian citizen, a foreigner with a residence permit, an EU citizen or someone living abroad. This guide explains what the codice fiscale is, who issues it in your case, which forms you need, how to get a duplicate and how to avoid the most common mistakes.
Italian tax code calculator
PDF guide
One hundred and one things to do in Italy without paying a ticket
Free places, rituals, festivals and walks, region by region, with a month-by-month calendar. A 50-page PDF guide.
See the guide, €4.90PDF right after payment, readable offline



↓ The page continues below
At a glance
- The codice fiscale is a 16-character code that identifies every person in dealings with the Italian public administration, banks, offices and companies.
- The only valid code is the one issued by the Agenzia delle Entrate (the Italian Revenue Agency): calculators found online have no legal value.
- Newborns get it from the Comune (town hall); foreigners with a permesso di soggiorno (residence permit) get it through the Questura (police headquarters) or the Sportello Unico per l'Immigrazione (immigration one-stop shop); people living abroad can ask the Italian consulate.
- Anyone without a code can ask for it at any local office of the Agenzia delle Entrate with form AA4/8, which is free and can be downloaded from the website.
- The tessera sanitaria (health card) carries the codice fiscale; if it is lost or damaged you request a duplicate in the reserved area with SPID, CIE or CNS.
- You can check a code with the Agenzia's verification service, with no registration.
Who needs it
Anyone who deals with the Italian public administration or tax authorities needs one: Italian citizens, who receive it at birth; foreigners who live in Italy or stay there for work, study or family reasons; non-resident foreigners who buy a home, inherit property, open a business or have a court case in Italy; and Italians registered with the AIRE (the register of Italians resident abroad). Typical cases: a rental contract, a bank account, electricity and gas contracts, enrolment in the national health service, a job, buying property, university enrolment.
What to prepare
- A valid identity document: identity card or passport (for EU citizens, a document valid for travel abroad).
- Form AA4/8, filled in, for individuals who do not yet have a codice fiscale (free, downloadable from the Agenzia delle Entrate website or available at the counters).
- The reason for the request, for example buying property, work, study or an inheritance.
- If you cannot go in person: a special power of attorney (procura speciale) to a trusted person, a notary or a lawyer, who files the request with the offices in Italy.
- For non-EU citizens with a residence permit: the documents required for the permit, because the code is assigned together with that application.
- For a duplicate: SPID, CIE or CNS credentials for the reserved area, or an identity document if you go to the counter.
Step by step
1. Find out who assigns your code
You cannot choose or calculate your own codice fiscale: it is assigned by the Agenzia delle Entrate, either directly or through other offices. The route depends on your situation.
Newborns: the code is assigned by the Comune when it records the birth in the registry. If it is urgent or slow to arrive, the parents can request it online or with form AA4/8 at an Agenzia office.
Foreigners who need a permesso di soggiorno: the code is assigned by the Questura, the border police and the Sportelli Unici per l'Immigrazione, which are linked to the tax registry. As a rule you do not need to go to the Agenzia delle Entrate.
People living abroad: the code is assigned by the Italian diplomatic and consular offices in the country of residence, following the rules of each office.
Everyone else: any local office of the Agenzia delle Entrate.
2. Non-EU foreigners in Italy
If you come from a country outside the European Union and want to stay in Italy, you get the codice fiscale through the residence permit procedure.
If the reason is employment or family reunification, the Sportello Unico per l'Immigrazione at the Prefettura (the state's local office) takes care of it. For other types of permit, the Questura does.
Non-EU students receive a first code when they pre-enrol on the Universitaly portal and finalise it at the Sportello Unico or the Questura together with the permit.
In special cases, for example when a homonymous code is suspected (omocodia), a provisional numeric code may be issued, which can be used to register with the national health service.
3. EU citizens and anyone without a code
EU citizens staying in Italy, and in general anyone who does not have a codice fiscale, can go to a local office of the Agenzia delle Entrate.
You present the completed form AA4/8, a valid identity document (identity card or passport) and the reason for the request.
The Agenzia lets you book a counter appointment through its booking service, up to about three weeks ahead according to its service charter. EU students finalise their code at the Agenzia with the same form.
4. If you live abroad: consulate or proxy
A foreign citizen who does not live in Italy but needs to buy property, inherit, start a business or follow a court case generally has two options.
The first, which consulates give as the general rule, is to appoint a trusted person (a notary, a lawyer, a relative) with a special power of attorney: that person then files the form directly with the Agenzia delle Entrate offices in Italy.
The second is to contact the Italian consulate responsible for your place of residence, where the office allows it. Some offices accept the request by email or by appointment, with the completed AA4/8 form, a copy of an identity document and the reason for the request. Other offices have restricted this option: for example, the consulate in Marseille accepts requests only from residents of its own district and only when the person cannot appoint anyone. Rules change from office to office, so it is worth reading the page of the consulate concerned before writing.
Documents issued by foreign authorities may need legalisation or an apostille, as consulates and the Ministry of Foreign Affairs remind applicants.
5. Italians abroad (AIRE)
Adult Italian citizens registered with the AIRE can request the codice fiscale for themselves and their minor children from the consulate. Some offices, such as the consulate in Zurich, use the Fast It portal: you enter the consular registry and AIRE section, choose the assignment of the codice fiscale, confirm and start the request. Once the procedure is complete, you download the assignment certificate from the portal.
You can also go directly to an Agenzia delle Entrate office in Italy. Those who already have the code can download the certificate from the same portal, without any involvement of the consulate.
6. The health card and the codice fiscale
The tessera sanitaria is the card for people entitled to the Servizio Sanitario Nazionale (national health service) and it also shows the codice fiscale. People who are not entitled to the health service receive only the plain codice fiscale card.
An adult's first card is issued by the ASL (local health authority). For newborns, the Agenzia delle Entrate automatically sends a card valid for one year and then one valid for six years, after the parents have enrolled the child with a paediatrician. The Agenzia normally sends the new card before the old one expires; after expiry, the card remains valid as proof of the codice fiscale.
The Sistema Tessera Sanitaria, run by the Ministry of Economy and Finance, also offers other services in a reserved area: electronic prescriptions, the electronic health record, medical expenses and income-based exemptions. Assistance is available on the toll-free number 800 030 070, shown on the site.
7. Duplicate: loss, theft, damage
If the health card or the plain codice fiscale card is lost, stolen or damaged, you ask for it to be reissued.
Health card: in the reserved area of the Agenzia delle Entrate website with SPID, CIE or CNS; or by sending form AA4/8 by certified email (PEC); or at the counter by appointment, or at the ASL. Delivery by post takes about three to four weeks.
Plain codice fiscale card only: you can also request it through an online service that does not require identification.
People living abroad: the request is submitted to the diplomatic or consular office, with delivery in Italy or at the office itself.
8. Checking the code, correcting data and omocodia
To check that a code matches your personal details there is the Verifica codice fiscale service of the Agenzia delle Entrate, which requires no registration. It is useful before signing a contract or filling in a form.
The 16 characters follow a precise rule: consonants of the surname and first name, year of birth, a letter for the month, the day of birth (increased by 40 for women), the code of the place of birth and a final check character. A free program can calculate them, but the result has no legal value: only the code assigned by the Agenzia counts.
If the data on the card are wrong, people registered with ANPR (the national registry of the resident population) contact their Comune; others can have the data corrected at any Agenzia office with a valid document.
When two people would end up with the same code (omocodia), the Agenzia assigns a new one: until then a provisional code can be used.
Costs and timing
On the official sites read in November 2026 (Agenzia delle Entrate, consulates) no fee is stated for assigning the codice fiscale: forms AA4/8 and AA5/6 can be downloaded free from the Agenzia's website. As for timing, the Agenzia gives a target average counter wait of about 30 minutes, with bookings possible up to about three weeks ahead. Postal delivery of a duplicate health card takes about three to four weeks. Processing times through the Questura, the Sportello Unico or the consulate are not specified on the pages read and vary from office to office.
Where to do it
In Italy: any local office of the Agenzia delle Entrate, with an appointment booked on the website; the Agenzia's reserved area with SPID, CIE or CNS for duplicates; the Questura and the Sportello Unico per l'Immigrazione at the Prefettura for non-EU citizens; the Comune for newborns; the ASL for the first health card. Abroad: the Italian embassy or consulate responsible for your residence, following the rules on each office's page (booking through the Prenot@mi system, email or, for Italians registered with the AIRE, the Fast It portal). For detailed information in several languages, the Agenzia delle Entrate publishes a dedicated guide for foreign citizens.
Mistakes to avoid
- Using a codice fiscale calculated by a website or a program: it has no legal value and banks and offices may reject it.
- Going to the wrong office: non-EU citizens with a residence permit go through the Questura or the Sportello Unico, not the Agenzia delle Entrate.
- Sending a request to a consulate that does not accept it, or from outside its district, without first reading the office's page.
- Submitting form AA4/8 without a reason or with an expired document.
- Not checking the data printed on the card: a mistake in the name or place of birth causes problems with contracts and banks.
- Trusting emails that ask for personal or login details for the health card: the system reports phishing campaigns and states that it never asks for personal data by email.
- Confusing the health card with the codice fiscale: the card contains the code, but people not entitled to the health service receive only the plain codice fiscale card.
Frequently asked questions
What is the codice fiscale?
It is a 16-character code that identifies every person in dealings with the Italian public administration. It contains letters and numbers derived from surname, first name, date and place of birth and sex, plus a check character. The only valid one is the code issued by the Agenzia delle Entrate.
How do foreigners get a codice fiscale?
If you need a permesso di soggiorno, the Questura, the border police or the Sportello Unico per l'Immigrazione assign it, with no need to go to the Agenzia delle Entrate. EU citizens and anyone without a code can ask for it at an Agenzia office with form AA4/8 and a valid document.
Can I get a codice fiscale before arriving in Italy?
Yes, in some cases. People living abroad can appoint a trusted person to file the request with the Agenzia delle Entrate offices, or contact the Italian consulate if the office accepts this kind of request. University students receive it when they pre-enrol on the Universitaly portal.
Does the codice fiscale cost anything?
The official sites consulted do not state any fee for assigning it, and the forms can be downloaded free. Any costs come from other services, for example a notary, a lawyer, legalisation of documents or postage.
How do I get a duplicate of the health card?
From the reserved area of the Agenzia delle Entrate website with SPID, CIE or CNS, or with form AA4/8 sent by certified email, or at the counter by appointment. The card arrives by post in about three to four weeks.
How do I check whether a codice fiscale is correct?
Use the Verifica codice fiscale service of the Agenzia delle Entrate, which needs no registration and compares the code with the personal data. Calculators found online have no legal value.
What is omocodia?
It is the case in which two people would have the same codice fiscale. The Agenzia delle Entrate assigns one of them a new code. In the meantime a provisional numeric code can be used, including to register with the national health service.
My card has wrong data: what do I do?
People registered with ANPR contact their Comune. Others can have the data corrected at an Agenzia delle Entrate office with a valid identity document.
How is a newborn's codice fiscale obtained?
The Comune assigns it after the birth is declared. If it is urgent or late, the parents can request it online or with form AA4/8 at the Agenzia delle Entrate.
Official sources
- Agenzia delle Entrate, Codice fiscale e tessera sanitaria: risposte alle domande più frequenti (cittadini) (read November 2026)
- Agenzia delle Entrate, Carta dei servizi: codice fiscale e tessera sanitaria (read November 2026)
- Consolato d'Italia a Marsiglia, nuove modalità di attribuzione del codice fiscale a stranieri non residenti (read November 2026)
- Consolato d'Italia a Fiume, codice fiscale per stranieri (read November 2026)
- Consolato Generale d'Italia a Zurigo, codice fiscale per cittadini italiani (read November 2026)
- Sistema Tessera Sanitaria, portale del Ministero dell'Economia e delle Finanze (read November 2026)
This guide explains the general rules and is not a substitute for professional advice: for your own case, contact the relevant office, a notary, a lawyer or an accountant.