Generator · Estonian data
Estonian isikukood
Endpoint GET /v1/ee/isikukood
What it covers
Returns a valid Estonian isikukood (personal identification code) with a correct two-pass mod-11 check digit. Constrain with `sex` and age/birth-date filters (the full birth date is encoded). Contradictory combinations are rejected with a 400. Set `invalid=true` for a deliberately wrong check digit.
How it’s calculated
The Estonian isikukood check digit is a two-pass weighted-sum modulo-11 over the first ten digits (G YYMMDD SSS), falling back to a second weight set and finally 0 whenever a pass yields a residue of 10.
Algorithm
- Assemble the 10-digit payload as G YYMMDD SSS, where G is the century/sex leading digit, YYMMDD is the two-digit year, month and day of birth, and SSS is a three-digit serial number. The check digit is the 11th digit.
- Convert the 10 payload characters to their numeric digit values d[0..9] (leading zeros preserved).
- First pass: multiply each digit by weight1 at the same position, where weight1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1]. Sum all ten products.
- Take that sum modulo 11. Call it r1.
- If r1 is less than 10, the check digit IS r1. Stop.
- Otherwise (r1 == 10), do a second pass: multiply each digit by weight2 at the same position, where weight2 = [3, 4, 5, 6, 7, 8, 9, 1, 2, 3]. Sum all ten products.
- Take that second sum modulo 11. Call it r2.
- If r2 is less than 10, the check digit IS r2. Otherwise (r2 == 10) the check digit is 0.
- Append the check digit to the payload to form the full 11-digit isikukood.
Worked example
Male born 1985-03-14, serial 007 → isikukood 385031400?
Payload (G YYMMDD SSS): G=3 (1900s band, male), YYMMDD=850314, serial=007 → 3850314007.
Digits: [3,8,5,0,3,1,4,0,0,7].
First pass with weights1 [1,2,3,4,5,6,7,8,9,1]: 3×1=3, 8×2=16, 5×3=15, 0×4=0, 3×5=15, 1×6=6, 4×7=28, 0×8=0, 0×9=0, 7×1=7.
Sum = 3+16+15+0+15+6+28+0+0+7 = 90.
90 mod 11 = 90 − 88 = 2. r1 = 2.
2 < 10, so the check digit is 2 — no second pass needed.
Full isikukood: 38503140072.The check digit is 2, giving the full isikukood 38503140072.
Edge cases
- The leading digit G is not free: it jointly encodes century and sex — 1/2 = 1800s male/female, 3/4 = 1900s male/female, 5/6 = 2000s male/female (odd = male, even = female). G values 7/8 are reserved for a future century and are never generated here.
- When the first-pass residue is exactly 10 the check digit is NOT 10 (there is no two-digit check); the second weight set [3,4,5,6,7,8,9,1,2,3] is applied instead, and only if that also yields 10 does the check digit become 0.
Gotchas
- The two weight sets are related by a rotation: weights2 is weights1 shifted so it starts at 3 (3,4,5,6,7,8,9,1,2,3). Using the wrong set on the fallback pass produces a subtly wrong-but-plausible check digit.
- The check digit covers exactly the first ten digits including the leading G; it must be recomputed if any of G, the date, or the serial changes.
- toDigits preserves leading zeros — the serial SSS and date fields are treated as a digit string, never parsed through Number, so a payload like 3850314007 keeps its interior zeros in the weighted sum.
Parameters
| Parameter | Type | Description |
|---|---|---|
| atAge | integer | Exact age in years at request time. |
| bornAfter | stringpattern ^\d{4}(?:-\d{2}(?:-\d{2})?)?$ | Born after this date or fragment (YYYY, YYYY-MM, YYYY-MM-DD). |
| bornBefore | stringpattern ^\d{4}(?:-\d{2}(?:-\d{2})?)?$ | Born before this date or fragment (YYYY, YYYY-MM, YYYY-MM-DD). |
| bornOn | stringpattern ^\d{4}(?:-\d{2}(?:-\d{2})?)?$ | Born on a date or within a fragment: YYYY, YYYY-MM, or YYYY-MM-DD. |
| count | integer1–1000 | Number of records to return, 1–1000 (your plan may lower this). Omitted returns a single record; set it for a batch. |
| edge | boolean | Restrict output to edge-case values. |
| extreme | boolean | Return a correct value wrapped in a hostile encoding (untrimmed whitespace, invisible/zero-width characters, BOM, or bidi/combining marks). Homoglyphs are excluded so the value stays machine-parseable; it still validates after normalisation. |
| invalid | boolean | Return an isikukood with a deliberately wrong mod-11 check digit; date/sex stay valid. |
| olderThan | integer | Minimum age in years at request time. |
| seed | integer | Integer seed for reproducible output: the same seed always yields the same record. |
| sex | "m" | "f" | Encoded sex: "m" or "f". |
| youngerThan | integer | Maximum age in years at request time. |
Response fields
| Field | Type | Description |
|---|---|---|
| value | string | The isikukood in the requested form. |
| digits | string | The canonical 11-digit isikukood. |
| birthDate | string | The encoded birth date, ISO `YYYY-MM-DD`. |
| sex | "m" | "f" | Encoded sex: `m` (odd) or `f` (even) leading digit. |
Other generators for Estonia
Estonian companyEstonian company nameEstonian email addressEstonian IBANEstonian KMKREstonian personEstonian person nameEstonian product or service offeringEstonian registrikoodEstonian vehicle registration plate
See all generators for Estonia →The same kind of identifier elsewhere
Austrian data · Austrian SVNRBelgian data · Belgian RijksregisternummerBulgarian data · Bulgarian EGNCroatian data · Croatian JMBGCroatian data · Croatian OIBCypriot data · Cyprus TICCzech data · Czech rodné čísloDanish data · Danish CPRDutch data · Dutch BSNFinnish data · Finnish henkilötunnusFinnish data · Finnish Y-tunnusFrench data · French NIRGerman data · German Steuer-IdNrGreek data · Greek AFMGreek data · Greek AMKAHungarian data · Hungarian adóazonosító jelHungarian data · Hungarian személyi azonosítóHungarian data · Hungarian TAJIrish data · Irish PPSNItalian data · Italian Codice FiscaleLatvian data · Latvian personas kodsLithuanian data · Lithuanian asmens kodasLuxembourg data · Luxembourg matriculePolish data · Polish PESELPortuguese data · Portuguese NIFRomanian data · Romanian CNPSlovak data · Slovak rodné čísloSlovenian data · Slovenian davčna številkaSlovenian data · Slovenian EMŠOSpanish data · Spanish DNISpanish data · Spanish NIESwedish data · Swedish personnummer
Try it