Skip to main content

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:

PositionFieldLengthMeaning & RuleExample
1 to 7Plot / Parcel7 charsGeographical identification of the land parcel or plot9872023
8 a 14Cartographic Sheet7 charsMunicipal cartographic sheet identificationVH5797S
15 to 18Property / Unit4 charsSpecific unit or dwelling identifier (floor, door, or room)0001
19 and 20Check Characters2 lettersTwo alphabetical verification characters computed via Modulo 23WX

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:

DC = 'MQWERTYUIOPASDFGHJKLBZX'[sum(charVal * weight) % 23]
  1. 1. Build Substring 1 for the first DC: 7 parcel characters concatenated with the 4 unit characters (11 characters).
  2. 2. Build Substring 2 for the second DC: 7 cartographic sheet characters concatenated with the 4 unit characters (11 characters).
  3. 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. 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. 5. The remainder of the division by 23 indexes the control character table 'MQWERTYUIOPASDFGHJKLBZX'.

Frequently Asked Questions & Technical Guidelines