Codice Fiscale Calculator + Reverse Decoder
Build the 16-character codice fiscale from a name, birth date and comune - with every part explained and the omocodia variants shown - or paste an existing code to read back the birth date, sex and place of birth. Everything runs in your browser, including the full 10,000-entry Belfiore code table.
Names, dates and codes are processed entirely in your browser. Nothing is uploaded, and no codice fiscale you enter is stored or logged anywhere.
Includes every current and abolished comune plus foreign countries. Type at least two letters.
Fill in the four fields above
The rule most calculators get wrong
The three letters taken from the surname and the three from the first name are not derived the same way, and this is where most free tools produce a wrong code. For the surname (art. 3 of DM 23 dicembre 1976) you take the first three consonants. For the first name (art. 4) you take the first three consonants only if there are three or fewer; if the name has four or more consonants you take the first, third and fourth, skipping the second.
So Giuseppe (consonants G-S-P-P) gives GPP, not GSP. Francesco (F-R-N-C-S-C) gives FNC, not FRN. If a calculator hands you GSP for Giuseppe, it has implemented the surname rule twice. This tool shows you which rule it applied and why, so you can see the difference.
Omocodia, properly implemented
Two people can legitimately produce the same 16 characters - same initials, same birth date, same comune. When that happens the Agenzia delle Entrate issues an omocodic variant: numeric characters are replaced by letters using a fixed table (0→L, 1→M, 2→N, 3→P, 4→Q, 5→R, 6→S, 7→T, 8→U, 9→V), starting from the rightmost digit and spreading left, with the check character recomputed each time. Seven positions can be substituted, giving 127 possible variants.
Both directions are handled here. The calculator lists the variants in the exact order the Agenzia would assign them, and the decoder accepts any omocodic code, tells you how many digits were substituted, and reconstructs the original non-omocodic form.
The Belfiore code table
The four characters before the check letter identify the comune or foreign country of birth. The table shipped with this tool holds 9,864 comuni - current and long-abolished, because someone born in a comune that was merged away in 1928 still carries its code for life - plus 222 foreign states. It's loaded into your browser once and searched locally.
الأسئلة الشائعة
Come funziona il calcolo del codice fiscale inverso?
Incolla il codice nella scheda "Reverse decode": lo strumento verifica il carattere di controllo e poi ricava la data di nascita, il sesso e il comune di nascita dal codice Belfiore. Ricorda che l'anno è memorizzato con due sole cifre, quindi quando entrambi i secoli danno una data reale vengono mostrati tutti e due, indicando quello più probabile. Il cognome e il nome non sono ricostruibili: la codifica delle consonanti perde informazione ed è irreversibile per definizione.
Come si fa il calcolo del codice fiscale con omocodia?
Compila nome, cognome, data di nascita, sesso e comune: dopo il codice ordinario lo strumento mostra le varianti omocodiche nell'ordine esatto in cui l'Agenzia delle Entrate le assegna, sostituendo le cifre con lettere (0→L, 1→M, 2→N, 3→P, 4→Q, 5→R, 6→S, 7→T, 8→U, 9→V) partendo da destra e ricalcolando il carattere di controllo. Le posizioni sostituibili sono sette, per un totale di 127 varianti possibili.
Can I recover someone's name from their codice fiscale?
No, and no tool can. The name encoding throws information away - RSS could be Rossi, Russo, Rissa or hundreds of other surnames, and the process is mathematically irreversible. What the decoder does recover is the birth date, the sex, and the comune or country of birth, because those are encoded reversibly. Any site claiming to reverse the name is guessing from a list.
Why does the decoder show two possible birth years?
The code stores only the last two digits of the year, so 83 could mean 1983 or 2083, and 05 could mean 1905 or 2005. When both centuries give a real calendar date and a plausible age, the tool shows both and marks the likelier one rather than silently picking one. For most codes only one century is possible, and then a single year is shown.
Is the code this tool produces the official one?
It's the code the official algorithm produces for the details you entered, computed exactly as DM 23 dicembre 1976 specifies. But if an omocodia collision occurred, the Agenzia delle Entrate will have assigned a variant instead - and only they know which. Always verify against the tessera sanitaria, a certificate of attribution, or the Agenzia's own verification service before using a code officially.
Does this work for people born outside Italy?
Yes. Search the place-of-birth field for a country name - Germania, Brasile, Stati Uniti d'America - and the Z-prefixed country code is used in place of a comune code. All 222 foreign state codes are included, along with historic ones for countries that no longer exist.
What about a comune that no longer exists?
It's in the table. Someone born in a comune that was merged or abolished decades ago keeps that comune's Belfiore code for life, so the table includes all 9,864 historic and current comuni. Abolished ones are marked as such in the picker and noted when decoding, so you know why a place name looks unfamiliar.
How is the check character calculated?
Each of the first 15 characters is converted to a number, using one table for odd positions and a different one for even positions, the values are summed, and the total modulo 26 gives a letter from A to Z. The two tables are what make the check sensitive to character order, so swapping two characters is detected.
Is my data sent anywhere?
No. The name, birth date and comune you type, and any code you paste, are processed entirely in your browser. The Belfiore table is a static file downloaded once and searched locally. Nothing is uploaded, logged or stored.
Can I check a partita IVA here too?
Yes - paste an 11-digit partita IVA into the decoder and it's validated with the Luhn check digit. It's a company tax number rather than a personal codice fiscale, so there's no birth date or sex to decode, and the tool says so instead of showing an error.