German ePA-ID / KVNR (Health ID) Validator
Validate the authenticity, format, and checksum of German ePA-ID / KVNR (Health ID).
About German ePA-ID / KVNR (Health ID) Validation
The validator converts the leading letter (A=01 to Z=26) and verifies the alternating product sum via Modulo 10, checking strict Gematik guideline compliance.
Runs entirely in your local environment with zero transmission of sensitive medical health data.
Anatomy & Structure of ePA-ID (KVNR)
ePA-ID is based on the 10-character KVNR standard specified by gematik (§ 290 SGB V):
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 | Initial Letter | 1 letter | Uppercase letter (A-Z) converted to 2-digit numerical code (A=01 to Z=26) | A |
| 2 to 9 | Insured Serial | 8 digits | Unique non-transferable sequential ID issued by health insurer | 12345678 |
| 10 | Check Digit | 1 digit | Control digit calculated using weighted Modulo 10 with digit sum | 9 |
ePA-ID Validation Algorithm (Weighted Modulo 10 with Digit Sum)
gematik specifies alternating 1-2-1-2 weights with digit sum (Quersumme) calculation:
P = sum(Quersumme(d_i * w_i)) % 10
- 1. Convert initial letter to 2 digits matching alphabet order (A=01, B=02, ..., Z=26).
- 2. Form a 10-digit array combining the 2 letter digits with the 8 serial digits.
- 3. Multiply by alternating weights: [1, 2, 1, 2, 1, 2, 1, 2, 1, 2].
- 4. Calculate digit sum (Quersumme) for each product >= 10.
- 5. Sum all digit sums and apply modulo 10 to obtain the 10th check digit.