Skip to content
Try it yourselfCodice fiscale calculatorYour 16-character code, with every step explained.Open tool

You get a codice fiscale from one Italian office, and which one depends on why you are in Italy. Work and family-reunification entries are handled by the immigration desk, residence permits by the police headquarters, and everyone else by the Agenzia delle Entrate or an Italian consulate abroad. If you only want to see what your code should look like, the codice fiscale calculator builds it from your name, birth date and country, but only the office can issue the real one.

The short answer by situation

The Agenzia delle Entrate (AdE) lists these routes on its page for foreign citizens. We have re-read it for this guide; offices and procedures change, so check the page before you go.

Your situation Where the code is assigned
Non-EU citizen entering Italy for work or family reunification The Sportello Unico per l’Immigrazione, where the entry application is filed
Non-EU citizen applying for or renewing a residence permit The Questura (police headquarters)
Living abroad An Italian diplomatic or consular office in your country of residence
EU citizen, or any other case Any office of the Agenzia delle Entrate

In the first two cases you usually don’t ask for it separately: it is assigned as part of that procedure, and you receive a certificate of attribution.

Asking the Agenzia delle Entrate directly

For a first codice fiscale at an AdE office, the agency says you must book an in-person appointment so your identity can be checked. The request is made on form AA4/8, which can also be sent by certified email (PEC) according to the AdE page for citizens.

You must show one of these:

  • a valid passport, with the visa if one is required, or another document Italian authorities accept,
  • a photo identity certificate from your country’s diplomatic or consular office in Italy,
  • a valid residence permit,
  • an identity card issued by your Italian municipality of residence.

EU citizens need a valid identity card or passport. Non-EU applicants must also be able to show they have a right to stay in Italy, even a temporary one.

The page does not mention a fee, and we have not found one. If a person or website asks you to pay for the code itself, treat it as a warning sign and check with the agency.

What you receive

You get a certificate of attribution with your code. It is valid while you wait for the tessera sanitaria or the code card to arrive at the tax-residence address you gave. The agency also states that the only valid code is the one it issues.

That last point matters if you have worked it out yourself. A calculator rebuilds the structure from your details, but it cannot know whether the agency assigned you a variant with letters in place of digits (omocodia, explained here).

What the code will look like for a foreigner

If you were born abroad, the place part is not a comune. It is a code starting with Z for your country of birth: the United States is Z404. Here is a worked case, using a made-up person and the same rules the calculator applies, with Italian birthplace Milan (F205) to keep the check easy to repeat:

Francesca Bianchi, woman, born 29 June 1992.

  • Surname Bianchi: consonants B, N, C, H, first three give BNC.
  • Name Francesca: consonants F, R, N, C, S, C (four or more), so take the 1st, 3rd and 4th: FNC.
  • Year 92, month June is the letter H, day 29 plus 40 for a woman is 69.
  • Place F205.
  • Check letter: the first 15 characters add up to 135, and 135 divided by 26 leaves 5, which is the letter F.

Result: BNCFNC92H69F205F (illustrative example, not yet confirmed with the Agenzia delle Entrate checking service). Someone born abroad swaps F205 for a Z code and the check letter changes with it. The calculator shows every step for your own data.

Things we could not confirm

We only state what the AdE pages we read say. These are not confirmed, so ask the office or a professional:

  • Processing times, and whether a certificate is issued at the appointment. The pages do not say.
  • Whether every consulate accepts requests in the same way. The AdE page says you can apply to Italian consular authorities in your country of residence, but each consulate’s rules and booking systems are its own.
  • Special cases, such as asylum seekers, short stays or minors. We have not read official guidance on them.
  • Whether you can get the code before arriving in Italy for a specific purpose, such as renting a flat or opening a bank account, beyond the consulate route above.

If something is wrong afterwards

The AdE page says that for loss or theft you can request a duplicate online or at an office, and for incorrect personal data you can ask for a correction at any office with a valid ID. To confirm a code belongs to the person you think it does, use the agency’s free verification service, linked below. To catch a typo before submitting a form, use the validator.

If you are just arriving, our taxes overview for people moving to Italy shows where the codice fiscale fits.

Official sources

Last updated 25 Nov 2026

Found a mistake or have a question? Contact us · How we check our numbers