Generator · Lithuanian data
Lithuanian PVM (VAT) number
Endpoint GET /v1/lt/pvm
What it covers
Returns a valid Lithuanian PVM mokėtojo kodas (VAT identification number) with a correct two-pass mod-11 check digit. Use `format=vat` for the `LT`-prefixed form. Set `invalid=true` for a PVM number with a deliberately wrong check digit.
How it’s calculated
The 9th digit of a Lithuanian PVM mokėtojo kodas (VAT payer code) is a two-pass ISO 7064-style mod-11 check digit computed over the 8 payload digits, whose 8th position is a fixed marker of 1.
Algorithm
- Start from an 8-digit payload d1 d2 ... d8 (indices 0..7). Positions 1-7 are the identifying digits; position 8 (index 7) is always the fixed marker digit 1 for the 9-digit legal-entity form.
- Define the first-pass weights: weights1[i] = 1 + (i mod 9) for i = 0..7. Because i only reaches 7, this evaluates to [1, 2, 3, 4, 5, 6, 7, 8].
- Compute the first weighted sum S1 = sum over i of ( payload[i] * weights1[i] ).
- Compute r1 = S1 mod 11.
- If r1 < 10, the check digit is r1. Stop.
- Otherwise (r1 == 10), define the second-pass weights: weights2[i] = 1 + ((i + 2) mod 9) for i = 0..7, which evaluates to [3, 4, 5, 6, 7, 8, 9, 1].
- Compute the second weighted sum S2 = sum over i of ( payload[i] * weights2[i] ), and r2 = S2 mod 11.
- If r2 < 10, the check digit is r2. Otherwise (r2 == 10) the check digit is 0.
- Append the resulting single check digit to the payload to form the 9-digit PVM code. For the LT VAT presentation, prefix the literal 'LT' to the 9 digits.
Worked example
PVM payload 1234567 with fixed marker 1 → 12345671?
Payload digits (index 0..7): [1, 2, 3, 4, 5, 6, 7, 1] — note the last digit is the fixed marker 1.
weights1 = [1, 2, 3, 4, 5, 6, 7, 8].
S1 = 1*1 + 2*2 + 3*3 + 4*4 + 5*5 + 6*6 + 7*7 + 1*8 = 1 + 4 + 9 + 16 + 25 + 36 + 49 + 8 = 148.
r1 = 148 mod 11 = 5 (since 11*13 = 143, 148 - 143 = 5).
r1 = 5 < 10, so the check digit is 5. No second pass needed.
Full 9-digit code: 123456715 (VAT form: LT123456715).The check digit is 5, giving the full PVM code 123456715 (LT123456715).
Edge cases
- zero-check-digit corner: when the two-pass computation yields 0 (either r1 or r2 equals 0, or both passes overflow to residue 10 giving a forced 0), the 9th digit is 0 — a valid value naive filters sometimes reject.
- repeated-pattern corner: the first seven payload digits can legitimately all be the same digit (e.g. 1111111 then marker 1), which still produces a valid check digit despite looking like a placeholder.
- Double-overflow: if both passes produce residue 10, the check digit is forced to 0 rather than being unissued — this scheme never rejects a payload, so the generator never has to redraw.
Gotchas
- The 8th digit (index 7) is not free: this generator always fixes it to the marker 1, identifying the 9-digit legal-entity form. It participates in the weighted sum with weight 8 (pass 1) / weight 1 (pass 2).
- The two passes use DIFFERENT weight vectors, not merely a re-run: pass 2 shifts the cycle by 2 (weights2[i] = 1 + ((i+2) mod 9)), yielding [3,4,5,6,7,8,9,1], and is only invoked when pass 1's residue is exactly 10.
- The check digit is a pure single digit 0-9 and is fully determined by the 8 payload digits; corrupting it by adding 1..9 mod 10 always produces an invalid number (the corrupt path).
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 PVM numbers 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 PVM number (default) or LT-prefixed VAT number. |
| invalid | boolean | Return a PVM number 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 PVM number in the requested format (national or LT-prefixed VAT). |
| digits | string | The canonical, unprefixed 9-digit PVM number. |
Other generators for Lithuania
Lithuanian asmens kodasLithuanian companyLithuanian company nameLithuanian email addressLithuanian IBANLithuanian įmonės kodasLithuanian personLithuanian person nameLithuanian product or service offeringLithuanian 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