Checksum methodology for VAT identifiers
This page documents common checksum families used by VAT identifiers. National implementations can vary; always verify registration status via official services.
MOD 97
Used for remainder-based schemes where a numeric representation is validated by modulo 97 constraints.
Concept
Diagram
Luhn family
Digit transform checksum: alternating weights with a “double then subtract 9” normalization for digits ≥ 10.
Algorithm sketch
Weighted sums and control digits
Many identifiers use fixed weights multiplied by digits, then reduced by modulo arithmetic to produce a control digit or letter.
Example: MOD 23 control letter
Used by Spanish NIF/NIE: remainder of the numeric component determines a control letter from a fixed alphabet.
Failure modes and what a checksum does not prove
- Checksum pass ≠ registration: a syntactically valid identifier can be inactive or reassigned.
- Transcription errors: most checksum methods catch single-digit errors and many transpositions, but not all.
- Normalization errors: spaces, punctuation, missing prefix, and wrong identifier types (e.g., SIRET vs SIREN) are common causes of false failures.
Implementation notes (validator)
VAT-Scan implements checksum logic client-side where the algorithm is public and deterministic. For cases where national rules require external mapping tables or authority-held datasets, the validator reports structural validity only and directs users to VIES for official confirmation.