Generator · German data

German Wirtschafts-IdNr

Endpoint GET /v1/de/wirtschafts-idnr

What it covers

Returns a valid German Wirtschafts-IdNr (business identification number): a `DE`-prefixed nine-digit core with a correct ISO 7064 MOD 11,10 check digit plus a five-digit distinguishing suffix. Use `suffix` to set it. Set `invalid=true` for a number with a deliberately wrong check digit.

How it’s calculated

The nine-digit core carries a single ISO/IEC 7064 MOD 11,10 check digit computed over the eight payload digits by an iterative recurrence; the DE prefix and five-digit distinguishing suffix carry no checksum.

Algorithm

  1. Take the eight payload digits of the core (the first is 1-9, the remaining seven are 0-9). The DE prefix and the -NNNNN suffix are NOT part of the checksum input.
  2. Initialise a running value `product = 10`.
  3. For each payload digit d, in order left to right: compute `sum = (d + product) mod 10`.
  4. If `sum` is 0, set `sum = 10` (the 0->10 mapping).
  5. Update `product = (sum * 2) mod 11`.
  6. After all eight digits are processed, the check digit is `(11 - product) mod 10` — always a single decimal digit 0-9, so it never has to be redrawn.
  7. Append this check digit as the ninth digit of the core. The final value is `DE` + the nine-digit core + `-` + a zero-padded five-digit suffix (default 00001).

Worked example

Core payload 13579246 -> DE13579246?-00001

Start product = 10.
d=1: sum=(1+10)%10=1 (not 0); product=(1*2)%11=2.
d=3: sum=(3+2)%10=5; product=(5*2)%11=10.
d=5: sum=(5+10)%10=5; product=(5*2)%11=10.
d=7: sum=(7+10)%10=7; product=(7*2)%11=14%11=3.
d=9: sum=(9+3)%10=2; product=(2*2)%11=4.
d=2: sum=(2+4)%10=6; product=(6*2)%11=12%11=1.
d=4: sum=(4+1)%10=5; product=(5*2)%11=10.
d=6: sum=(6+10)%10=6; product=(6*2)%11=12%11=1.
Check digit = (11 - 1) % 10 = 10 % 10 = 0.

The check digit is 0, giving the core 135792460 and the full W-IdNr DE135792460-00001.

Edge cases

  • The check digit is fully determined by the eight payload digits, so the MOD 11,10 recurrence always produces exactly one decimal digit (0-9) — there is no unrepresentable residue and no redraw case.
  • The distinguishing five-digit suffix (default 00001) has no checksum of its own; it is an integer in 1..99999 rendered as exactly five zero-padded digits.
  • invalid:true corrupts only the ninth (check) digit: the correct digit is offset by a random 1..9 mod 10, guaranteeing it never lands back on the valid value.

Gotchas

  • The checksum covers only the nine-digit numeric core — not the literal DE prefix nor the -NNNNN suffix. Feeding DE or the suffix into the recurrence gives wrong results.
  • This is the recursive ISO 7064 MOD 11,10 system (iterative product folding), NOT a weighted-sum mod-11 scheme; do not confuse it with the plain mod11.ts weighting.
  • The 0->10 remap inside the loop (when `sum` computes to 0) is essential — omitting it changes the result.

Parameters

ParameterTypeDescription
countinteger1–1000Number of records to return, 1–1000 (your plan may lower this). Omitted returns a single record; set it for a batch.
edgebooleanRestrict output to valid edge-case suffixes (smallest and largest).
extremebooleanReturn 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.
invalidbooleanReturn a W-IdNr whose nine-digit core has a deliberately wrong ISO 7064 check digit.
seedintegerInteger seed for reproducible output: the same seed always yields the same record.
suffixintegerFive-digit distinguishing suffix as a number (1..99999); rendered zero-padded.

Response fields

FieldTypeDescription
valuestringThe full identifier, e.g. "DE123456789-00001".
digitsstringThe canonical nine-digit core (no DE prefix, no suffix).
suffixstringThe five-digit distinguishing suffix, e.g. "00001".

Other generators for Germany

See all generators for Germany →

The same kind of identifier elsewhere

Try it

Generate a live example below — every response is valid by format and entirely synthetic.