Generator · Lithuanian data
Lithuanian įmonės kodas
Endpoint GET /v1/lt/imones-kodas
What it covers
Returns a valid Lithuanian įmonės kodas (company code) with a correct two-pass mod-11 check digit. The code is non-semantic. Set `invalid=true` for an įmonės kodas with a deliberately wrong check digit.
How it’s calculated
The 9th digit of a Lithuanian įmonės kodas is a two-pass ISO 7064-style weighted mod-11 check digit over the first eight digits.
Algorithm
- Take the 8-digit payload d1..d8 (the first eight of the nine įmonės kodas digits). The 9th digit is the check digit to be computed.
- Pass 1: multiply each payload digit by its position weight from weights1 = [1, 2, 3, 4, 5, 6, 7, 8] (so d1×1, d2×2, ..., d8×8) and sum the eight products.
- Compute first = (pass-1 weighted sum) mod 11.
- If first < 10, the check digit is first. Stop.
- Otherwise (first === 10): Pass 2: multiply each payload digit by its position weight from weights2 = [3, 4, 5, 6, 7, 8, 9, 1] (d1×3, d2×4, ..., d7×9, d8×1) and sum the eight products.
- Compute second = (pass-2 weighted sum) mod 11.
- If second < 10, the check digit is second. Otherwise (second === 10) the check digit is 0.
- Append the resulting single digit as the 9th digit to form the complete įmonės kodas.
Worked example
įmonės kodas 12345678? (payload 12345678, check digit = ?)
Payload digits: d1..d8 = 1,2,3,4,5,6,7,8.
Pass 1 with weights1 = [1,2,3,4,5,6,7,8]: 1×1=1, 2×2=4, 3×3=9, 4×4=16, 5×5=25, 6×6=36, 7×7=49, 8×8=64.
Pass-1 sum = 1+4+9+16+25+36+49+64 = 204.
first = 204 mod 11 = 204 − (11×18=198) = 6.
first = 6 < 10, so the check digit is 6 (second pass not needed).The check digit is 6, giving the full įmonės kodas 123456786.
Edge cases
- When the first pass yields residue 10 (no single-digit answer), the algorithm recomputes with the shifted weights2 = [3,4,5,6,7,8,9,1]. This second-pass weight vector is the first-pass weights rotated: positions 1-7 use 3..9 and position 8 wraps back to 1.
- If BOTH passes yield residue 10, the check digit is forced to 0 (this is the ISO 7064 fallback; the raw '10' is never emitted as a check digit).
- The generator draws the leading digit d1 in the range 1-9 (never 0), so a numeric parse of the 9-digit code keeps all nine digits; digits d2..d8 are drawn freely 0-9.
Gotchas
- The check digit is fully determined by the first eight digits, so it can be any value 0-9 (the 0 case can arise either as a genuine residue-0 or as the both-passes-overflow fallback).
- weights1 and weights2 cover the 8-digit payload only, not the check digit position; the weighted sum runs over exactly eight products in each pass.
- The two-pass scheme means you cannot validate with a single fixed weight vector — a code whose pass-1 residue is 10 will only validate against the pass-2 (or 0) result, never against the pass-1 remainder.
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 įmonės koods 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 an įmonės kodas 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 įmonės kodas in the requested form (currently the bare digits). |
| digits | string | The canonical 9-digit įmonės kodas. |
Other generators for Lithuania
Lithuanian asmens kodasLithuanian companyLithuanian company nameLithuanian email addressLithuanian IBANLithuanian personLithuanian person nameLithuanian product or service offeringLithuanian PVM (VAT) numberLithuanian vehicle registration plate
See all generators for Lithuania →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 RSINEstonian data · Estonian KMKREstonian data · Estonian registrikoodFrench 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 numursLuxembourg 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