Spanish Cadastral Reference Validator
Validate the authenticity, 20-character structure, and checksum control digits of Spanish Cadastral References.
About Cadastral Reference Validation
Technical validation confirms that the entered code matches exactly 20 valid alphanumeric characters and that the two final control characters (positions 19 and 20) correspond to the mathematical algorithm required by the Spanish Cadastre Directorate.
The algorithm evaluates plot and cartographic block substrings alongside the unit code, applying the official 11-position weighting matrix and Modulo 23 calculation.
Cadastral Reference Anatomy & Specification
The Cadastral Reference consists of 20 alphanumeric characters structured into 4 logical blocks:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 to 7 | Plot / Parcel | 7 chars | Geographical identification of the land parcel or plot | 9872023 |
| 8 a 14 | Cartographic Sheet | 7 chars | Municipal cartographic sheet identification | VH5797S |
| 15 to 18 | Property / Unit | 4 chars | Specific unit or dwelling identifier (floor, door, or room) | 0001 |
| 19 and 20 | Check Characters | 2 letters | Two alphabetical verification characters computed via Modulo 23 | WX |
Control Character Calculation Algorithm (Double Modulo 23)
The official algorithm from the Directorate General for Cadastre utilizes two 11-character substrings combined with the unit code:
- 1. Build Substring 1 for the first DC: 7 parcel characters concatenated with the 4 unit characters (11 characters).
- 2. Build Substring 2 for the second DC: 7 cartographic sheet characters concatenated with the 4 unit characters (11 characters).
- 3. Map each character to a numeric value: digits 0-9 evaluate to 0-9; letters follow the 27-letter Spanish alphabet (A=1 to N=14, Ñ=15, O=16 to Z=27).
- 4. Multiply each character by its positional weight in [13, 15, 12, 5, 4, 17, 9, 21, 3, 7, 1] and sum the products.
- 5. The remainder of the division by 23 indexes the control character table 'MQWERTYUIOPASDFGHJKLBZX'.