Polish PESEL National ID Validator
Validate structural compliance, date of birth and check digits of Polish PESEL numbers.
About Polish PESEL Validation
Validation sanitizes input, decodes birth date and gender, and computes the Modulo 10 check digit.
Supports all official century offsets (19th, 20th, 21st, 22nd, and 23rd centuries).
Anatomy & Structure of Polish PESEL
PESEL consists of 11 decimal digits regulated by the Ministry of Digital Affairs:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 to 2 | Birth Year | 2 digits | Last two digits of the birth year | 85 |
| 3 to 4 | Month & Century | 2 digits | Month encoded with century offset (+0 for 1900s, +20 for 2000s) | 07 |
| 5 to 6 | Birth Day | 2 digits | Day of birth (01 to 31) | 30 |
| 7 to 9 | Sequential Counter | 3 digits | Sequential registration number | 123 |
| 10 | Gender | 1 digit | Odd for Male, Even for Female | 4 |
| 11 | Check Digit | 1 digit | Weighted Modulo 10 security digit | 8 |
PESEL Calculation & Validation Algorithm (Modulo 10)
PESEL validation computes the security digit using weighted Modulo 10:
DV = (10 - ((∑ di × Weights[i]) mod 10)) mod 10 (Weights: 1, 3, 7, 9, 1, 3, 7, 9, 1, 3)
- 1. Remove spaces and hyphens from the string.
- 2. Validate that the sequence has exactly 11 numeric digits.
- 3. Decode month and century and verify valid calendar day.
- 4. Multiply the first 10 digits by weights [1, 3, 7, 9, 1, 3, 7, 9, 1, 3].
- 5. Compute the 10's complement of the weighted sum modulo 10.
- 6. Compare the obtained value against the 11th digit.