Check whether a string matches the structural pattern of an Italian codice fiscale. Validation runs entirely in your browser and returns a simple valid / invalid result based on character layout and the official check-digit algorithm.
What is checked
The validator applies two layers:
- Regular-expression structure — confirms length (16 characters), allowed letter/digit positions, month encoding, day range (including the +40 offset for female birth days), and municipality segment shape.
- Check character — recomputes the control letter from the first 15 characters and compares it to the final character.
A code that passes both steps is syntactically correct; a failure indicates a typo, truncated input, or an invalid check digit.
When to use it
Ideal for form validation during data entry, QA of imported spreadsheets, or quick sanity checks before sending records to downstream systems.
Limitations
Structural validation does not prove that the code belongs to a living person, that the encoded birth data is accurate, or that the municipality code is currently active. Two different people cannot share a code, but a well-formed code may still be unused or fictitious.
Example
A 16-character Italian codice fiscale sample is accepted by the format rules; a shortened string fails.