Validator of Latvia Personas Kods
Latvian personal identification code (PMLP) with weighted Modulo 11.
About Latvian Personas Kods
The Personas Kods is the unique civil identity code assigned by the PMLP to citizens, non-citizens, and registered residents of Latvia.
On July 1, 2017, Latvia introduced an alternative non-significant format starting with '32' to protect individual privacy by omitting birthdates.
Anatomy & Structure of Latvian Personas Kods
The Latvian Personas Kods consists of 11 digits (classic DDMMYY-SCCSC or post-2017 32XXXXXXXXX):
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 to 6 | Birth Date or Prefix | 6 digits | Day, month, and year (DDMMYY) or '32' prefix for modern format | 010110 |
| 7 | Century Indicator | 1 digit | 0 (19th c.), 1 (20th c.), 2 (21st c.) in classic format | 1 |
| 8 to 10 | Registry Sequence | 3 digits | Sequential number issued by PMLP | 234 |
| 11 | Check Digit | 1 digit | Weighted Modulo 11 verification checksum | 4 |
Official PMLP Algorithm (Weighted Modulo 11)
Verification formula applied to the first 10 digits:
- 1. Multiply the first 10 digits by weights [1, 6, 3, 7, 9, 10, 5, 8, 4, 2].
- 2. Calculate the weighted sum and find remainder modulo 11.
- 3. Subtract remainder from 1 (C = 1 - remainder). If C < -1, add 11.
- 4. If result equals 10 or -1, the code is invalid/discarded by PMLP.
- 5. Verify match with the 11th digit.
Frequently Asked Questions (FAQ)
Why do some Latvian personal codes start with 32?
Codes issued from July 2017 onwards may start with 32 and contain no birthdate information to enhance personal privacy.
Is the hyphen required in the Personas Kods?
In standard documentation a hyphen separates the birthdate and sequence (e.g. 010110-12344), while electronic databases accept raw 11 digits.