Updated on 1 October 2026
A foreign citizen receives the tax code (codice fiscale) from a different office depending on their situation: the Immigration One-Stop Shop (Sportello Unico per l’Immigrazione) if they enter for employed work or family reunification, the police immigration office (Questura) if they apply for or renew a residence permit (permesso di soggiorno), the Italian consulate if they live abroad. In all other cases you go to an office of the Revenue Agency (Agenzia delle Entrate) with form AA4/8, by appointment.
In brief
- If you apply for a residence permit, you usually receive the codice fiscale from the Questura.
- If you enter with a work permit clearance (nulla osta) (employed work or family reunification), you receive it from the Sportello Unico.
- If you live abroad you can ask for it at the Italian consulate.
- In other cases: Revenue Agency, form AA4/8, in-person appointment.
- Codes calculated on internet sites are not valid.
What is the codice fiscale used for?
The codice fiscale is the number that identifies every person to the Italian State. You need it for almost everything: a work contract or rental contract, registration with the National Health Service, opening a bank account, a phone SIM card, your tax return. For a foreign citizen it is one of the first documents needed.
Who issues the codice fiscale to a foreigner?
The Revenue Agency explains that it depends on the person’s situation:
| Your situation | Who gives you the codice fiscale |
|---|---|
| You enter Italy with a nulla osta for employed work or family reunification | Immigration One-Stop Shop (Sportello Unico per l’Immigrazione) (Prefecture) |
| You apply for the issue or renewal of a residence permit | Questura |
| You apply for international protection | Questura or border police, when you make the application |
| You live abroad and need an Italian codice fiscale | Italian consulate or embassy in your country |
| You are legally in Italy but do not yet have the code | Revenue Agency office |
In the first cases the code is assigned automatically, through a link between the Ministry of the Interior and the Revenue Agency. For this reason, according to the Agency, you do not also need to go to the Agency to ask for it.
How do I request the codice fiscale from the Revenue Agency?
If you fall under the last case in the table, here are the steps:
- Download and fill in form AA4/8 (you can find it on the Revenue Agency website).
- Book an appointment at an Agency office. For the first codice fiscale of a foreign citizen, EU or non-EU, being present at the counter is compulsory, because the office has to identify you.
- Bring a valid document. For non-EU citizens the Agency accepts one of these:
- valid passport, with the visa when required;
- certificate of identity issued by your embassy or consulate in Italy;
- valid residence permit;
- identity card issued by the Municipality where you live.
- Sign the form at the counter and keep the document with the code that is handed to you.
A tip: check that your first name, surname and date of birth are written exactly as in your passport. A mistake here is then repeated in all your Italian documents.
Can I get the codice fiscale if I still live abroad?
Yes. People living abroad can ask for the codice fiscale from the Italian diplomatic or consular mission in the country where they live. It is useful, for example, for people living in Saudi Arabia, the Emirates or Pakistan who are preparing to enter Italy for work or family.
If entry is through the decreto flussi or family reunification, the codice fiscale is usually assigned by the Sportello Unico during the nulla osta procedure.
What is the provisional numeric codice fiscale?
Sometimes the codice fiscale is made only of numbers. The Agency explains that it is a provisional numeric code, assigned in particular cases: for example when two people would have the same code (omocodia) or in some procedures coming from the Ministry of the Interior.
With the provisional code, according to the Agency, you can register with the National Health Service if you are entitled to. But for many things (bank, contracts, work) it is better to have the final alphanumeric code: to get it you go to an office of the Revenue Agency.
Does the codice fiscale expire with the residence permit?
The codice fiscale does not expire. The health card (tessera sanitaria), however, according to the Agency normally has the same validity as the residence permit. When you renew your permit, you must ask again for registration with your local health authority (ASL) to get a new card. Read also the guide on renewing your residence permit in Milan.
Can I calculate the codice fiscale online?
No. On the internet there are many sites that “calculate” the codice fiscale. The Revenue Agency is clear: codes calculated with applications published on websites have no value and using them can cause problems. For foreigners the risk is even higher, because the country of birth and name details can be written in different ways.
Do you need help with the codice fiscale?
The codice fiscale seems a simple thing, but a wrong or provisional code can block a contract, a bank account or a permit application. We can check your case, tell you which office to go to and prepare form AA4/8 with you.
Book a 30-minute consultation for €60 at our office in Milan or online on WhatsApp, or write to Sofia, the studio’s assistant, on WhatsApp from the booking box on this page. The full service is on the codice fiscale page.
Frequently asked questions
Who issues the codice fiscale to a foreign citizen?+
It depends on the situation: the Immigration One-Stop Shop (Sportello Unico per l'Immigrazione) for those entering for employed work or family reunification, the police immigration office (Questura) for those applying for or renewing a residence permit, the Italian consulate for those living abroad, otherwise an office of the Revenue Agency (Agenzia delle Entrate).
Which documents do I need for the codice fiscale at the Revenue Agency?+
Form AA4/8 filled in and signed and, for non-EU citizens, one of these: valid passport with visa if required, a certificate of identity from your consulate in Italy, a valid residence permit or an identity card from the Municipality.
Do I need an appointment at the Revenue Agency?+
Yes. For the first codice fiscale of a foreign citizen, EU or non-EU, the Agency asks you to book an in-person appointment, because it has to identify the person.
I have a codice fiscale made only of numbers: is it valid?+
It is a provisional numeric code, assigned in particular cases such as identical codes (omocodia) or Ministry of the Interior procedures. To get the final alphanumeric code you go to an office of the Revenue Agency.
Can I calculate the codice fiscale online?+
No. The Revenue Agency explains that codes calculated with applications published on websites have no value. The only valid one is the one assigned by the Agency.