Generator · Estonian data
Estonian registrikood
Endpoint GET /v1/ee/registrikood
What it covers
Returns a valid Estonian registrikood (Commercial Register code for a legal entity) with a correct two-pass mod-11 check digit. Set `invalid=true` for a registrikood with a deliberately wrong check digit.
How it’s calculated
The Estonian registrikood (business registry code) is an 8-digit number whose final digit is a two-pass ISO 7064-style modulo-11 check digit computed over the first seven digits.
Algorithm
- Take the seven payload digits d1 d2 d3 d4 d5 d6 d7 (the first seven of the eight-digit registrikood). d1 is the entity-type marker and is one of 1, 7, 8, 9, but for the checksum it is treated as an ordinary digit.
- First pass: multiply each payload digit by its position weight from weights1 = [1, 2, 3, 4, 5, 6, 7], i.e. sum1 = 1*d1 + 2*d2 + 3*d3 + 4*d4 + 5*d5 + 6*d6 + 7*d7.
- Compute r1 = sum1 mod 11.
- If r1 is less than 10, the check digit is r1. Stop.
- Otherwise (r1 == 10) run the second pass: multiply each payload digit by its position weight from weights2 = [3, 4, 5, 6, 7, 8, 9], i.e. sum2 = 3*d1 + 4*d2 + 5*d3 + 6*d4 + 7*d5 + 8*d6 + 9*d7.
- Compute r2 = sum2 mod 11.
- If r2 is less than 10, the check digit is r2. Otherwise (r2 == 10) the check digit is 0.
- Append the resulting single check digit as the eighth digit.
Worked example
registrikood 1234567?
Payload digits: d1=1, d2=2, d3=3, d4=4, d5=5, d6=6, d7=7.
First pass with weights1 = [1,2,3,4,5,6,7]: 1*1 + 2*2 + 3*3 + 4*4 + 5*5 + 6*6 + 7*7 = 1 + 4 + 9 + 16 + 25 + 36 + 49 = 140.
r1 = 140 mod 11 = 140 - 132 = 8.
8 is less than 10, so the check digit is 8. The second pass is not needed.
Full registrikood: 12345678.The check digit is 8, giving the full registrikood 12345678.
Edge cases
- When the first-pass residue r1 equals 10, the check digit is not simply 10 (which is not a single digit); a second weighted pass with weights [3,4,5,6,7,8,9] is run instead, and if that residue is also 10 the check digit falls back to 0. This mirrors the ISO 7064 two-pass fallback used by Estonia and Lithuania.
- The leading digit d1 encodes the entity type: 1 = commercial company, 7 = state institution, 8 = non-profit association, 9 = foundation. The generator only draws d1 from {1,7,8,9}, but the check-digit math treats d1 as a plain digit with weight 1.
Gotchas
- The weights are the plain ascending sequences 1..7 (first pass) and 3..9 (second pass), NOT a repeating/cyclic Lithuanian-personal-code style pattern. This generator passes exactly weights1=[1,2,3,4,5,6,7] and weights2=[3,4,5,6,7,8,9].
- The check digit is the raw residue itself (a 'remainder' scheme), never an 11-complement. There is no 11-minus-sum step; only the two-pass overflow-at-10 fallback applies.
Parameters
| Parameter | Type | Description |
|---|---|---|
| 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 valid edge-case registrikoods from the rare corners. |
| 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 a registrikood with a deliberately wrong mod-11 check digit. |
| seed | integer | Integer seed for reproducible output: the same seed always yields the same record. |
Response fields
| Field | Type | Description |
|---|---|---|
| value | string | The registrikood in the requested form. |
| digits | string | The canonical 8-digit registrikood. |
Other generators for Estonia
Estonian companyEstonian company nameEstonian email addressEstonian IBANEstonian isikukoodEstonian KMKREstonian personEstonian person nameEstonian product or service offeringEstonian vehicle registration plate
See all generators for Estonia →The same kind of identifier elsewhere
Austrian data · Austrian FirmenbuchnummerAustrian data · Austrian SteuernummerAustrian data · Austrian UIDBelgian data · Belgian OndernemingsnummerBulgarian data · Bulgarian EIKCzech data · Czech IČODanish data · Danish CVRDutch data · Dutch btw-idDutch data · Dutch KvK numberDutch data · Dutch RSINFrench data · French SIRENGerman data · German HandelsregisternummerGerman data · German Personalausweis numberGerman data · German USt-IdNrGerman data · German Wirtschafts-IdNrHungarian data · Hungarian adószámHungarian data · Hungarian cégjegyzékszámIrish data · Irish CRO numberIrish data · Irish VAT numberItalian data · Italian Partita IVALatvian data · Latvian registracijas numursLithuanian data · Lithuanian įmonės kodasLithuanian data · Lithuanian PVM (VAT) numberLuxembourg data · Luxembourg TVAMaltese data · Maltese identity card numberMaltese data · Maltese VAT numberPolish data · Polish driving licence numberPolish data · Polish ID card numberPolish data · Polish KRS numberPolish data · Polish land and mortgage register numberPolish data · Polish NIPPolish data · Polish passport numberPolish data · Polish REGONPortuguese data · Portuguese Cartão de Cidadão numberRomanian data · Romanian CUI/CIFSlovak data · Slovak IČ DPHSlovak data · Slovak IČOSpanish data · Spanish CIFSwedish data · Swedish organisationsnummer
Try it