Generator · Estonian data
Estonian KMKR
Endpoint GET /v1/ee/kmkr
What it covers
Returns a valid Estonian KMKR (käibemaksukohustuslase number, VAT number) with a correct check digit. Use `format=vat` for the `EE`-prefixed intra-EU VAT identifier. Set `invalid=true` for a KMKR with a deliberately wrong check digit.
How it’s calculated
The 9th digit of an Estonian KMKR (VAT registration number) is a weighted mod-10 check digit computed over the first eight digits with the repeating weight pattern 3, 7, 1.
Algorithm
- Start from the eight payload digits d1..d8 (the KMKR without its final check digit). The first digit d1 is 1-9 for the common shape; d2..d8 are 0-9.
- Apply the fixed weight vector [3, 7, 1, 3, 7, 1, 3, 7] positionally: multiply d1 by 3, d2 by 7, d3 by 1, d4 by 3, d5 by 7, d6 by 1, d7 by 3, d8 by 7.
- Sum all eight weighted products into S (a plain integer sum, no intermediate reduction).
- Take r = S mod 10.
- Compute the check digit as c = (10 - r) mod 10. The outer 'mod 10' makes c = 0 when r = 0, so the result is always a single digit 0-9 and never needs a redraw.
- Append c as the 9th digit: the full KMKR is d1 d2 d3 d4 d5 d6 d7 d8 c.
- (Equivalent validation view: over all nine digits with weights [3,7,1,3,7,1,3,7,1], the weighted sum is congruent to 0 mod 10 — the check digit carries its own weight 1.)
- For the 'vat' output format, prefix the literal 'EE' to the nine digits (EE + KMKR); the 'national' format returns the bare nine digits. The EE prefix is not part of the checksum input.
Worked example
KMKR payload 19283746 with check digit ? → 19283746?
Payload digits: 1,9,2,8,3,7,4,6; weights: 3,7,1,3,7,1,3,7.
Weighted products: 1×3=3, 9×7=63, 2×1=2, 8×3=24, 3×7=21, 7×1=7, 4×3=12, 6×7=42.
Sum S = 3+63+2+24+21+7+12+42 = 174.
r = 174 mod 10 = 4.
Check digit c = (10 - 4) mod 10 = 6.
Cross-check (full-number rule, weights 3,7,1,3,7,1,3,7,1): 174 + 6×1 = 180; 180 mod 10 = 0. Valid.The check digit is 6, so the full KMKR is 192837466 (VAT form EE192837466).
Edge cases
- When the weighted sum of the eight payload digits is already ≡ 0 mod 10, the check digit is 0 (the outer mod-10 collapses the would-be '10' to '0'); it never spills into two digits, so no prefix is ever redrawn.
- The common generator draws d1 in 1-9 (no leading zero); a leading-zero first digit is deliberately reserved for the separate edge-case generator.
Gotchas
- The check digit uses the repeating weight pattern 3,7,1 (NOT the ICAO/Luhn family). Only eight weights [3,7,1,3,7,1,3,7] are applied to the payload; the 9th position's implicit weight is 1 and appears only in the full-number validation view Σ wᵢ·dᵢ ≡ 0 (mod 10).
- The 'EE' VAT prefix is a formatting decoration, not checksum input — compute the check digit on the nine numeric digits only.
- Corruption for edge/invalid samples adds an offset 1..9 mod 10 to the correct check digit; because the offset is never 0 mod 10, the mutated digit is guaranteed to fail the weighted-mod-10 check.
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 KMKRs 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. |
| format | "national" | "vat" | Rendering: bare 9-digit KMKR (default) or `EE`-prefixed VAT number. |
| invalid | boolean | Return a KMKR with a deliberately wrong 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 identifier in the requested format (national or VAT). |
| digits | string | The canonical, unprefixed 9-digit KMKR. |
Other generators for Estonia
Estonian companyEstonian company nameEstonian email addressEstonian IBANEstonian isikukoodEstonian 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 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