The codice fiscale, explained (2026)
The codice fiscale is the 16-character code that identifies you to every Italian public body — and it is the first thing you need, before a bank account, a lease, a residence permit or a partita IVA. Which office issues yours depends on your citizenship and where you are when you ask. Here are the three routes, the form, and the traps — every point cited to the Agenzia delle Entrate and the law.
What the codice fiscale is
The codice fiscale is the identifier Italy uses for you in every dealing with public bodies and administrations. For an individual it is 16 characters, letters and digits, built from your surname, first name, and date and place of birth.13
It exists because of the anagrafe tributaria — the national tax register set up by DPR 605/1973, which is also what obliges banks, pension bodies, associations and other third parties to record your codice fiscale when they deal with you. That obligation is why you are asked for it constantly, including in situations that have nothing to do with tax.2
Who issues it — and why a generated code is not one
The Agenzia delle Entrate issues the codice fiscale, feeding it into the anagrafe tributaria. Several other bodies attribute it on the Agenzia's behalf: municipalities for newborns at first registration, the Sportelli Unici per l'Immigrazione for non-EU nationals applying to enter Italy for employment or family reunification, and the Questure for non-EU nationals applying for or renewing a residence permit.13
The three routes, by citizenship and location
Which door you knock on is decided by your citizenship and whether you are already in Italy. There is no single queue.3
| Your situation | Where to ask | What it takes |
|---|---|---|
| Resident abroad, not yet in Italy | The Italian diplomatic or consular mission in your country of residence | Request the attribution directly from the mission |
| EU citizen, already in Italy | Any Agenzia delle Entrate territorial office, by appointment | Form AA4/8, a motivated request, and a valid passport or ID card valid for travel abroad |
| Non-EU citizen entering for employment or family reunification | The Sportello Unico per l'Immigrazione handling your entry application | Attributed as part of that application — no separate request |
| Non-EU citizen applying for or renewing a residence permit | The Questura handling the permit | Attributed there if you do not already have one |
Where the route is the Agenzia delle Entrate, the instrument is form AA4/8 — the same form used to report a change of personal details or to ask for a replacement card. It can be sent by certified email (PEC) to any office of the Agenzia, not only the one for your area, with a copy of your identity document attached. If you sign the form with a digital signature, the identity document copy is not needed.14
Tessera sanitaria or tesserino: which card you get
The code and the card are different things. Everyone enrolled in the national health service (Servizio Sanitario Nazionale) receives a Tessera Sanitaria, which carries the codice fiscale on it. People not enrolled receive only the Tesserino del Codice Fiscale — a plain card that certifies the code and nothing else.31
- •An expired Tessera Sanitaria still works as proof of your codice fiscale, even though it no longer works for health services.3
- •The back of the Tessera Sanitaria is the European Health Insurance Card (TEAM/EHIC), usable across the EU plus Norway, Iceland, Liechtenstein and Switzerland.3
- •Lost or damaged cards are replaced through the Agenzia's online service, or by sending form AA4/8 by PEC to any office.34
Where it sits before a partita IVA
Opening a business activity is a separate, later step. If you are not required to register with the Registro Imprese — which is the usual position for a freelancer or professional — you open the partita IVA with form AA9/12, filed within 30 days of starting the activity, declaring the ATECO code for the work you intend to do.3
That filing identifies you by your codice fiscale, so the order is fixed: code first, activity second. It is also the point at which the regime question arrives — for most new freelancers under the revenue ceiling, the flat-rate regime forfettario is the default.3
Checking that a code is real
The Agenzia runs a free public service that checks whether a codice fiscale exists in the anagrafe tributaria, and whether it matches a given set of personal details. It answers 'codice fiscale valido' only for codes actually registered — which is the practical test that separates an attributed code from a computed one.83
Frequently asked questions
Do I need a codice fiscale before I can open a partita IVA?
Yes. The partita IVA filing (form AA9/12) identifies you by your codice fiscale, so the code has to exist first. The two are separate: the codice fiscale identifies you as a person, the partita IVA identifies a business activity.
Can I use a codice fiscale I generated on a website?
No. The Agenzia delle Entrate states that the only valid codice fiscale is the one it issues, never one produced by software it does not run. A generated string may have the right format but is not registered in the anagrafe tributaria, and will fail the Agenzia's own verification service.
Which office issues it if I am applying for a residence permit?
The Questura handling the permit attributes it, if you do not already have one. For non-EU nationals entering for employment or family reunification, the Sportello Unico per l'Immigrazione attributes it as part of the entry application instead.
What do I bring as an EU citizen already in Italy?
Form AA4/8, a motivated request, and a valid identity document — a passport or an ID card valid for travel abroad. Book an appointment at any Agenzia delle Entrate territorial office; it does not have to be the one for your address.
Is the tessera sanitaria the same as the codice fiscale?
No — the card carries the code. People enrolled in the national health service get a Tessera Sanitaria showing their codice fiscale; people not enrolled get only the Tesserino del Codice Fiscale. An expired Tessera Sanitaria still proves the code.
What do I do if my personal details change?
The same form AA4/8 is used to report changed details, such as your name or address, and to request a replacement card. It can be sent by certified email (PEC) to any office of the Agenzia delle Entrate.
Keep exploring
Sources
- 1.Agenzia delle Entrate — Il codice fiscale: che cos'è e come si ottiene
- 2.Normattiva — DPR 605/1973 (anagrafe tributaria e codice fiscale), art. 6 (obbligo di indicazione)
- 3.Agenzia delle Entrate — Codice fiscale, tessera sanitaria, partita IVA (guida, cap. 4)
- 4.Agenzia delle Entrate — Modello AA4/8 e istruzioni (attribuzione codice fiscale)
- 5.Agenzia delle Entrate — Mini guida al codice fiscale per stranieri (in 18 lingue)
- 6.Normattiva — D.Lgs. 286/1998 (Testo Unico Immigrazione), art. 26 (lavoro autonomo)
- 7.Normattiva — D.Lgs. 286/1998 (Testo Unico Immigrazione), art. 5 (permesso di soggiorno)
- 8.Agenzia delle Entrate — Verifica del codice fiscale (servizio pubblico)
Every figure on this page is grounded in primary sources — the same standard as the TaxCompass chat. This is sourced orientation, not tax advice.

