CodiceChiaroCalcolo codice fiscale online

Codice fiscale for foreigners: how to get your Italian tax code

The codice fiscale is Italy's personal tax identification code, and for anyone moving to the country it is usually the very first document to obtain: you will be asked for it when you sign a job contract, open a bank account, rent a flat or register with the national health service. This guide explains, in English, who needs one, what documents are required, and every route available to apply — in Italy or from abroad.

CodiceChiaro editorial team · Published 23 October 2026 · Last updated 23 October 2026
Written and checked by our editorial team against the official sources listed at the bottom of this page.

What the codice fiscale is

The codice fiscale is a 16-character alphanumeric code that identifies a person in dealings with the Italian public administration and many private organisations. It is issued by the Agenzia delle Entrate, the Italian Revenue Agency, and it is not a random number: it is built by an official algorithm from your surname, first name, date of birth and place of birth. That is why online calculators — including the one on this website — can predict it accurately from your personal details.

Two warnings matter for foreigners. First, a calculated code is only a prediction: the legally valid code is exclusively the one assigned by the Agenzia delle Entrate, because in rare cases (two people with nearly identical details) the official code differs from the calculated one. Second, the codice fiscale is not a residence permit and does not by itself authorise you to live or work in Italy — immigration status is a separate matter handled by different authorities.

Who needs one

You will need a codice fiscale if you plan to do any of the following in Italy:

  • Work as an employee or as a self-employed professional, or receive an Italian pension.
  • Open a bank or postal account, take out a mortgage or a loan.
  • Rent a home with a registered contract, or buy property.
  • Register with the Servizio Sanitario Nazionale (SSN), the national health service, and choose a general practitioner.
  • Enrol at a university or school, sign utility contracts, or complete inheritance and notarial procedures — even while living abroad.

You do not need to be an Italian resident to be assigned one: people living abroad who must complete a transaction in Italy (a property purchase, an inheritance) are entitled to request it as well.

Documents you need

The application is made with form AA4/8, the official request form for individuals, filled in and signed, together with a valid identity document:

  • EU/EEA and Swiss citizens: a valid national identity card or passport.
  • Non-EU citizens: a passport with the entry visa where required, or a valid residence permit (permesso di soggiorno); if you have already applied for the permit, the application receipt is accepted.
  • For minors: the application is submitted by a parent or guardian, with their own document and the child's.
  • If someone applies on your behalf: a signed delegation and a copy of your identity document.

Copy your personal details onto the form exactly as they appear on your identity document. The code is generated from those details, so a different spelling or order of given names can produce a code that does not match your documents — a common source of trouble later, especially for names with special characters or multiple given names.

How to apply: the four routes

1. At an Agenzia delle Entrate office (in Italy)

The standard route: book an appointment at a local office of the Agenzia delle Entrate through its website, bring form AA4/8 and your identity document, and the code is assigned on the spot. You leave with a paper certificate of attribution (certificato di attribuzione) that can be used immediately, for example with an employer. Assignment is free of charge.

2. Through the Sportello Unico per l'Immigrazione

Non-EU workers entering Italy with an employment authorisation (nulla osta) usually receive the code through the Sportello Unico per l'Immigrazione at the Prefettura, as part of the entry procedure handled with the employer. In that case you do not need a separate application: the code is included in the paperwork for the residence contract.

3. From abroad: consulates and hosting institutions

If you are not yet in Italy, you can apply through the Italian consulate in your country of residence, which forwards the request to the Agenzia delle Entrate. Students, researchers and employees relocating for work can often apply through their university or employer, which collects and submits the forms for incoming staff. Ask your host institution before arrival — having the code in advance makes the first days in Italy much simpler.

4. By certified email (PEC)

The Agenzia also accepts the AA4/8 form sent by certified email (PEC) to the competent office, with a copy of the identity document attached, following the instructions published on its website. This route is mainly practical for applicants who already have a PEC address, which is common for professionals and businesses operating in Italy.

Timelines, cost and validity

At a tax office counter the code is issued immediately. Through a consulate or by email, processing takes from a few days to a few weeks depending on the office. The assignment itself is always free: anyone asking for a fee is charging for optional assistance, not for the document. The assigned code is permanent and never expires — it stays the same if you later change address, employer or immigration status.

One exception to be aware of: in some situations an applicant initially receives a provisional numerical code of 11 digits, later replaced by the definitive 16-character code once the personal records are complete. If you receive an 11-digit number, that is expected behaviour, not an error — our Italian guide on provisional codes explains the conversion in detail.

After you receive your code

  • Keep the paper certificate of attribution: it is accepted by employers and banks as proof of the official code.
  • If you register with the health service (SSN), the plastic health card (tessera sanitaria) showing your codice fiscale will be posted to your Italian address.
  • Use the assigned code — not a calculated prediction — on contracts, bank forms and official applications.
  • If your name or date of birth were recorded incorrectly, ask the Agenzia to correct the underlying personal data: the code is derived from it and will be reissued accordingly.

Want to know in advance which code your details will generate? Use the calculator on this website: enter your surname, name, date of birth, sex and country of birth (foreign countries use a code starting with Z, listed in our foreign-country codes section). The result follows the official rules and is a reliable preview — but for official acts, always use the code assigned by the Agenzia delle Entrate.

Frequently asked questions

Is the codice fiscale free for foreigners?

Yes. Assignment by the Agenzia delle Entrate is always free, whether you apply at a tax office, through a consulate or through your employer or university. Private agencies may charge for assistance, but the document itself costs nothing.

Can I get a codice fiscale before moving to Italy?

In many cases yes: you can apply at the Italian consulate in your country, or through the Italian university or employer hosting you. This is recommended if you need to sign a contract or open an account immediately after arrival.

Does a codice fiscale let me work or live in Italy?

No. It is a tax identification number, not a residence or work permit. Non-EU citizens still need the appropriate visa and residence permit; EU citizens rely on their free-movement rights. The code simply identifies you for tax, health and administrative purposes.

Can I use the code from an online calculator for official paperwork?

You can use it as a preview, but official acts require the code assigned by the Agenzia delle Entrate. In a minority of cases (duplicate personal details, provisional records) the assigned code differs from the calculated one, so always switch to the official code once you receive it.

My assigned code is only 11 digits. Is it wrong?

No: it is a provisional numerical code, issued while your personal records are being completed. It will be converted into the standard 16-character code; when that happens, inform your employer, bank and health office of the new code.

I was born outside Italy. What place of birth goes into my code?

The country of birth, encoded with a code starting with the letter Z (for example Z110 for France, Z404 for the United States). You can look up every country code in the foreign-country codes section of this website.

Useful tools

Note: this guide is for information only. The legally valid codice fiscale is issued exclusively by the Agenzia delle Entrate; for your specific case, the competent office's instructions prevail.

Official sources

Related guides

CodiceChiaro — CodiceChiaro editorial team

Coming soon — optional paid service

Prefer to be guided through the application?

We are preparing an optional, clearly-priced assistance service for people who would rather be guided step by step through the codice fiscale application. Until it is available, everything on this page — and the official application at the Agenzia delle Entrate — remains completely free, and this guide already contains the full procedure.

This guide is also available in Italian: Codice fiscale per stranieri — la guida in italiano.