Generator · German data
German USt-IdNr
Endpoint GET /v1/de/ust-idnr
What it covers
Returns a valid German USt-IdNr (VAT identification number) with a correct ISO 7064 MOD 11,10 check digit. Use `format=national` for the bare nine-digit core. Set `invalid=true` for a number with a deliberately wrong check digit.
How it’s calculated
The German USt-IdNr (EU VAT number) appends a single ISO/IEC 7064 MOD 11,10 check digit computed by a pure recursive recurrence over the first eight payload digits.
Algorithm
- Take the eight payload digits in order (the first is 1-9, never 0; the remaining seven are 0-9). The ninth digit will be the check digit.
- Initialise a running value called `product` to 10.
- For each payload digit d, left to right: compute sum = (d + product) mod 10.
- If that sum is 0, replace it with 10 (i.e. map a 0 result to 10).
- Update product = (sum * 2) mod 11.
- After all eight digits have been processed, compute the check digit as checkDigit = (11 - product) mod 10.
- This always yields a single decimal digit 0-9 (no unrepresentable residue, never a redraw). Append it as the ninth digit.
- The national core is the eight payload digits followed by the check digit. The VAT form prefixes the literal 'DE' (format 'national' returns the bare nine digits).
Worked example
USt-IdNr with payload 13579246 and check digit ? (DE13579246?)
Start product = 10.
d=1: sum=(1+10) mod 10 = 1; sum!=0; product=(1*2) mod 11 = 2
d=3: sum=(3+2) mod 10 = 5; product=(5*2) mod 11 = 10
d=5: sum=(5+10) mod 10 = 5; product=(5*2) mod 11 = 10
d=7: sum=(7+10) mod 10 = 7; product=(7*2) mod 11 = 14 mod 11 = 3
d=9: sum=(9+3) mod 10 = 2; product=(2*2) mod 11 = 4
d=2: sum=(2+4) mod 10 = 6; product=(6*2) mod 11 = 12 mod 11 = 1
d=4: sum=(4+1) mod 10 = 5; product=(5*2) mod 11 = 10
d=6: sum=(6+10) mod 10 = 6; product=(6*2) mod 11 = 12 mod 11 = 1
checkDigit = (11 - 1) mod 10 = 10 mod 10 = 0The check digit is 0, giving national core 135792460 and VAT number DE135792460.
Edge cases
- A check digit of 0 is valid and occurs (the `zero-check-digit` edge class generates cores whose ninth digit is 0), so naive filters assuming a non-zero trailing digit will wrongly reject valid numbers.
- The first payload digit is always 1-9 (never 0); the smallest legal leading digit is 1 (the `leading-small` edge class exercises exactly this).
Gotchas
- This is ISO 7064 MOD 11,10 (a pure recursive recurrence), NOT a weighted-sum mod-11 scheme — do not confuse it with the mod11.ts primitive. The recurrence maps an intermediate sum of 0 to 10 before doubling mod 11.
- Because the system always produces a single decimal digit, there is never a 'residue 10 / redraw' case as with plain mod-11 identifiers.
- The generator's value is synthetic: the check digit is mathematically valid but the number is not guaranteed to belong to a registered business.
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 USt-IdNrs 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 nine-digit national core, or DE-prefixed VAT number (default). |
| invalid | boolean | Return a USt-IdNr with a deliberately wrong ISO 7064 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 USt-IdNr in the requested format (VAT or national). |
| digits | string | The canonical, unprefixed nine-digit core. |
Other generators for Germany
German companyGerman company nameGerman email addressGerman HandelsregisternummerGerman IBANGerman personGerman person nameGerman Personalausweis numberGerman product or service offeringGerman Steuer-IdNrGerman vehicle registration plateGerman Wirtschafts-IdNr
See all generators for Germany →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 SIRENHungarian 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