The Asmens Kodas (Lithuanian: personal code) is the 11-digit national identification number issued to every citizen and permanent resident of Lithuania by the State Population Register (Gyventojų registras). It appears on the national identity card, the passport, and virtually every official document from tax returns to healthcare registrations. Because the code encodes gender, birth century, and date of birth, a simple mathematical check can instantly confirm whether a given string is a structurally plausible code — or whether it has been mistyped, truncated, or fabricated.
This tool implements the official MOD-11 control-digit algorithm exactly as defined by Lithuanian state standards, decodes every embedded field, and explains the result in plain language. It is designed for developers integrating Lithuanian government services, HR systems handling employee records, KYC pipelines, or anyone who simply needs to check that a code is well-formed before submitting it to a downstream API.
How it works
An Asmens Kodas has exactly 11 decimal digits — no letters, no separators. The positions carry the following meaning:
| Positions | Field | Notes |
|---|---|---|
| d1 | Gender + century | 1–6; odd = male, even = female |
| d2–d3 | Birth year (YY) | Two-digit year within the century |
| d4–d5 | Birth month (MM) | 01–12 |
| d6–d7 | Birth day (DD) | 01–31 |
| d8–d10 | Serial number | 000–999, register-assigned |
| d11 | Control digit | MOD-11 checksum |
The first digit is the key to unlocking the birth year: digit 1 or 2 means the 19th century (1800–1899), 3 or 4 means the 20th century (1900–1999), and 5 or 6 means the 21st century (2000–2099). Odd values in that first position indicate male; even values indicate female.
The MOD-11 control-digit algorithm
The checksum uses two rounds of weighted multiplication:
Round 1 weights: 1 2 3 4 5 6 7 8 9 1 (applied to digits d1–d10)
Compute S1 = sum of (weight[i] × digit[i]) for i = 0..9, then take S1 mod 11.
- If S1 mod 11 is less than 10 → the control digit equals S1 mod 11. Done.
- If S1 mod 11 equals 10 → proceed to Round 2.
Round 2 weights: 3 4 5 6 7 8 9 1 2 3 (applied to the same digits d1–d10)
Compute S2 = sum of (weight[i] × digit[i]) for i = 0..9, then take S2 mod 11.
- If S2 mod 11 is less than 10 → the control digit equals S2 mod 11.
- If S2 mod 11 equals 10 → the control digit is 0.
The two-round design exists precisely to avoid ever assigning an invalid digit: if Round 1 would demand “10” as a single digit, Round 2 recalculates. If Round 2 also lands on 10, zero is used as a fallback (this is rare but valid).
Example
The code 3 89 01 01 000 7 is an obviously-fake sample useful for understanding the layout (the underlying person does not exist):
- d1 = 3 → male, born 1900–1999
- d2–d3 = 89 → year 1989
- d4–d5 = 01 → January
- d6–d7 = 01 → 1st day → birth date 1989-01-01
- d8–d10 = 000 → serial 000
- d11 = 7 → control digit to verify
Round 1: 1×3 + 2×8 + 3×9 + 4×0 + 5×1 + 6×0 + 7×1 + 8×0 + 9×0 + 1×0 = 3+16+27+0+5+0+7+0+0+0 = 58; 58 mod 11 = 3 (which is less than 10, so stop). Control digit should be 3, not 7 — so this particular string fails. Change d11 to 3 to get a structurally valid code: 38901010003.
Every calculation in this tool is performed client-side in your browser using pure JavaScript. No input is ever transmitted to a server.