---
id: "it_codicefiscale"
kind: "datatype"
status: "draft"
is_pii: true
categories: ["pii", "persons"]
country: ["IT"]
langs: ["it"]
quality: 100
url: "http://registry.apicrafter.io/datatype/it_codicefiscale"
---

# Italian tax code (codice fiscale) (`it_codicefiscale`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Codice fiscale, the tax code of people in Italy, issued by the Agenzia delle Entrate: 16 characters derived from the surname, the first name, the date of birth and sex (40 is added to the day for women), and the Belfiore code of the place of birth, with a check letter at the end. When two people would get the same code, digits are replaced by letters (omocodia). Legal entities have an 11-digit code that equals their VAT number (it_iva).

- Personal data (PII): yes
- Categories: Personally identifiable information (pii), Person related (persons)
- Countries: Italy (IT)
- Languages: Italian (it)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]$
```

Check digit algorithm: `it_codicefiscale`

## Examples

- `DYMMTM43M45I436N` — Synthetic number with a valid check digit
- `LVFGNC77T47H353V` — Synthetic number with a valid check digit
- `RCCMNL83S18D969H` — python-stdnum test value
- `DYMMTM43M45I436A` (invalid example) — Check letter does not match
- `DYMMTM43M45I436N7` (invalid example) — One character too many

## Mappings

- dpv: `pd:OfficialID`
- google_dlp: `ITALY_FISCAL_CODE`
- purview: `Italy fiscal code`, `EU national identification number`, `EU Tax Identification Number (TIN)`, `EU Tax identification number`
- schema_org: `taxID`
- stdnum: `it.codicefiscale`

## Supported by tools

- `amazonmacie`
- `awsglue`
- `azureailanguage`
- `collibra`
- `databricks`
- `dataprep`
- `googledlp`
- `ibmguardium`
- `ibmknowledgecatalog`
- `microsoftpurview`
- `openmetadata`
- `pythonstdnum`
- `snowflake`

## Translations

- it: Codice fiscale

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Italian_fiscal_code>
- wikipedia: <https://it.wikipedia.org/wiki/Codice_fiscale>
- other: <https://arthurdejong.org/python-stdnum/doc/2.2/stdnum.it.codicefiscale.html>
- other: <https://docs.dataprep.ai/user_guide/clean/clean_it_codicefiscale.html>

## Quality

Score 100/100.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/it_codicefiscale.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/IT/persons/it_codicefiscale.yaml>
