Decoding the Italian Codice Fiscale: What You Can Learn

In Italy, the codice fiscale (tax code) is a key identifier for every individual. It encodes your
surname, given name, date of birth, sex, and place of birth into a unique alphanumeric string of
16 characters. Most people understand how to generate or validate one, but fewer are aware of
the “inverse” process, decoding or reverse-calculating a codice fiscale to reveal personal data.
A detailed resource on this subject is found on the Codice Fiscale Calcolo site.
That page lays out the rules and logic behind decoding, along with error handling and special
cases.
In this article, we'll go deeper: explain the mechanics in an accessible way, highlight caveats
and limits, show worked, discuss legal and privacy aspects, and suggest practical
uses (and misuse examples) of reverse decoding.
The Anatomy of the Codice Fiscale
Before diving into decoding, it's essential to understand exactly how the codice fiscale is
structured. Each character or block has a defined meaning. Here's the breakdown:
Position
s
Meaning Details
1–3 Surname
consonants
The first three consonants of the surname; if fewer exist,
vowels or “X” fill the gap.
4–6 Name consonants The first, third, and fourth consonants of the given name
(skipping the second) — a quirk to reduce collisions.
7–8 Year of birth Last two digits of the year (eg “85” for 1985).
9 Month of birth Encoded by a letter (A = January, B = February, C = March,
and so on, omitting some letters).
10–11 Day + sex For males: the day (01–31). For females: day + 40 (eg
“45” means 5th day, female).
12–15 Place (municipality)
code
A letter and three numbers represent the codice
catastale (the municipal or foreign country code).
16 Check character A control character computed via a specific algorithm over
the first 15 characters.
These rules, which are well covered in the page on Codice Fiscale Inverso, are the foundation
of any decoding attempt.
Reverse Decoding: What You Can Recover
Given a valid 16-character codice fiscale, here's what you can reliably (or with high probability)
extract:
1. Year, month, day, sex.
Because those components are encoded directly (with a fixed rule), you can confidently
derive birth date and sex. For example, if the 7–8 digits read “90” and the 9th letter is “M”
(August), that implies August 1990. If positions 10–11 read “42”, subtract 40 → day = 2,
and sex = female.
2. Municipality or country of birth.
The 12–15 block maps to a known municipal or foreign place code. From a lookup table
(publicly maintained by Italian authorities), one can map that code to a city or foreign
country.
3. Surname / Name possibilities (with ambiguity).
Because the consonant/vowel selection rules lose information, the decoded name and
surname are only probabilistic. For example, “BRCL” might map to Baricella, Barcola,
Baricci, etc. The reversal can suggest the most likely names based on frequency
dictionaries.
4. Check digit verification / error detection.
If the final (16th) character does not match what the algorithm calculates from the first
15, the code is invalid or mistyped. The reversal process can flag such inconsistencies.
Thus, a decoding tool or algorithm (such as the one described on the Codice Fiscale Inverso
page) can output something like:
“Year: 1985; Month: March; Day: 23; Sex: male; Birthplace: Florence (Florence
municipality code 'D612'); Possible surname: Rossi, Russo, Rocci; Possible name:
Marco, Mario, Massimo.”
But there is always some uncertainty in the name/family suggestion.
Worked Example
Let’s do a simplified sample to illustrate:
Suppose the codice fiscale is RSSMRA85C23H501Z
● Positions 1–3: RSS → could map to Rossi, Rassa, Rossa, etc.
● Positions 4–6: MRA → name could be Maria, Marco (depending on consonant
arrangement).
● Positions 7–8: 85 → year 1985
● Positions 9: C → month “March”
● Positions 10–11: 23 → day 23, male (since less than or equal to 31)
● Positions 12–15: H501 → corresponds to municipality code (you look up H501 in the
table)
● Position 16: Z → check character computed; must match.
So we would decode: born 23 March 1985, male, birthplace = whatever H501 maps to (say
“Gamma Town”). The surname Rossi and name Maria / Marco might be suggested but not
certain.
Notice: if it had been 63 in position 10–11, it would indicate female born on the 23rd (63 – 40 =
23, so female).
Ambiguities, Edge Cases & “Omocodia”
Omocodia
One of the more interesting complications is omocodia (homonymy). This arises when two or
more persons share the same codice fiscale, typically because they have the same
surname, name, birth date, birth place. To manage this, the system introduces modifications
(substituting some letters with digits, or adjusting certain positions) so the codes differ, and the
check digit is recomputed.
In a decoding tool, omocodia means that what you see may be an adjusted code, and simple
reversal might not map cleanly to a unique person. The tool might detect such cases or flag
“multiple possibilities.”
Foreign nationals & non-Italian municipalities
When a person is born outside Italy, the place code block corresponds to a foreign country
code rather than a municipality. The decoding algorithm must incorporate tables that map these
codes correctly. The base logic still works, but with a different lookup.
Name changes, legal changes
If someone legally changes their name (marriage, adoption, etc.), the codice fiscale may or may
not be updated depending on jurisdictional practice. Decoding may reflect the original name
scheme, not the current name in all cases.
Changes to municipal codes / administrative changes
Over time, municipalities might merge, split, or change status. If the code block refers to a
municipal code that no longer exists or has changed, decoding can produce outdated or
ambiguous mapping. The tool should ideally maintain historical tables.
Invalid / malformed codes
Many errors can render the invalid code:
● Wrong letter for month (eg using "Q" illicit)
● Day > 31 or female day < 41
● Invalid municipal code (doesn't exist in lookup)
● Check character not matching algorithm
A robust reverse tool flags such problems and forbiddens the user.
Legal & Privacy Considerations
Here’s where things get delicate. Decoding personal data from a tax code enters the realm of
privacy, identity protection, and legal restriction.
● Personal data laws: In many jurisdictions (including EU's GDPR), a codice fiscale is a
kind of personal identifier. Using or exposing decoded data must respect privacy laws,
data minimization, purpose limitation, and user consent.
● Data protection & misuse: If someone uses a decoding tool to assemble personal
profiles without authorization, that could be illegal or unethical.
● Limit of inference: Even though you can decode date, sex, place reliably, inferring full
name or identity is probabilistic and uncertain. Tools should issue disclaimers that they
do not guarantee true identity.
● Disclosure & transparency: A website offering decoding should clearly disclaim that
decoded names are approximate, that privacy rules apply, and that misuse is unfair.
● Security & anti-abuse: The site should guard its reverse lookup tool (if interactive)
against automated scraping, brute forcing codes, or bulk decoding.
A best practice for a site like Codice Fiscale Inverso would be a strongly worded privacy notice
and disclaimer: “This tool is for educational or verification purposes only. The decoded name is
probabilistic. Do not use for identity theft, fraud, or unfair profiling.”
However, when I reviewed their page, such a prominent privacy or legal disclaimer was lacking,
which is a notable shortcoming.
Practical Uses & Limitations
When and why might someone use reverse decoding of a codice fiscale?
Legitimate uses:
● Verification / validation: If someone gives you a codice fiscale, you can check whether
it decodes to a probable combination (birth date, place) and matches identity claims.
● Data cleaning / correction: In administrative systems, you might detect errors in
entered fiscal codes.
● Genealogical or historical research: For archival or public records, one might try to
infer partial data from old codes.
● Educational / academic use: Teaching about encoding, algorithms, identifier systems.
Limitations / things you cannot do reliably:
● You cannot definitively reconstruct the exact person's name with 100% certainty
(except in trivial unique cases).
● You cannot extract data not encoded (eg full address, parents' names, citizenship
status beyond place code).
● In presence of omocodia, name collisions, code adjustments, or errors, decoding may
yield multiple ambiguous options.
● You cannot decode a codice fiscale that is invalid or malformed reliably.
Thus, reverse decoding is a helpful tool — but it is not a magic key to fully reveal identity.
Recommendations for a Better Reverse Decoding Resource
If you were designing or improving a website in this niche (like the one you showed), here are
some suggestions to make it more reliable, engaging, and responsible:
1. Interactive tool with visualization
Show, step by step, how each block is decoded, with hover explanations. Let the user
input a code and see live decoding.
2. Rich examples and edge cases
Present multiple case studies, including omocodia, foreign birthcodes, malformed
codes, municipal changes.
3. Ambiguity scoring / ranking
When suggests names/surnames, present a probability score (based on frequency in
Italy) or top N options.
4. Legal & privacy disclaimers
Clearly state that decoded names are probabilistic, that data must be used responsibly,
and that mass decoding may violate privacy laws.
5. Maintenance of lookup tables
Keep up to date with municipal changes, new place codes, foreign code tables,
historical codes.
6. API for limited access
Provide controlled API access for admin/official use, with rate limits and logging.
7. Multilingual support
Translate to English, German, etc., so expatriates or foreigners interacting with Italian
systems can benefit.
8. Educational articles / blog posts
Publish deep dives (eg how check digit is computed, algorithm complexity, historical
changes) to engage tech/crypto enthusiasts.
Conclusion
The Codice Fiscale Inverso page on codicefiscalcalcolo.it offers a solid foundation for
understanding how to decode an Italian codice fiscale. It lays out the structure, decoding logic,
error cases, and special conditions like omocodia. However, to elevate its value, it should add
stronger disclaimers, richer examples, interactive visuals, and deeper contextual insight.
Reverse decoding is a fascinating blend of algorithmic logic and probabilistic inference: date,
sex, and place can usually be deduced reliably, but the name and identity often remain partly
speculative. Anyone building or using such tools should do so with caution, respect for privacy,
and understanding of limitations.