Generator · Belgian data
Belgian Ondernemingsnummer
Endpoint GET /v1/be/ondernemingsnummer
What it covers
Returns a valid Belgian Ondernemingsnummer (enterprise number) with a correct `97 − (first8 mod 97)` check. Use `format=vat` for the BE VAT number. Set `invalid=true` for a number with a deliberately wrong check.
How it’s calculated
The Belgian enterprise number's two trailing check digits are 97 minus the first eight digits taken modulo 97, zero-padded to two digits.
Algorithm
- Take the first 8 digits of the enterprise number (the payload). The registry only issues numbers whose first digit is 0 or 1, but the checksum treats all 8 as a plain number.
- Interpret those 8 digits as a base-10 integer (leading zeros kept as part of the string but numerically dropped).
- Compute r = payload mod 97 using ordinary integer modulo (the code uses BigInt % 97n).
- Compute check = 97 - r. This yields a value in the range 1..97.
- Zero-pad check to exactly two digits (padStart(2, '0')). This is the two-digit check field.
- The full 10-digit enterprise number is the 8 payload digits followed by these two check digits.
Worked example
Enterprise number 04203040?? (first 8 digits 04203040, check digits unknown)
Payload = first 8 digits = 04203040, i.e. the integer 4203040.
Compute 4203040 mod 97: 97 × 43330 = 4203010, and 4203040 − 4203010 = 30, so r = 30.
check = 97 − r = 97 − 30 = 67.
67 is already two digits, so no zero-padding is needed; check field = '67'.
Full number = 04203040 followed by 67 = 0420304067.The check digits are 67, giving the full enterprise number 0420304067.
Edge cases
- Leading digit is only ever 0 or 1 — the only issuance blocks the Belgian registry uses; a numeric parse of a 0-leading number silently drops to nine digits.
- Because check = 97 - (n mod 97) lies in 1..97, every 8-digit prefix yields a valid two-digit check, so no prefix is 'dead' and no redraw is ever needed (unlike mod-11 schemes).
- A check value of 00 is unreachable (it would require 97 - (n mod 97) = 0, i.e. n mod 97 = 97, which is impossible); the smallest possible check is 01.
Gotchas
- The modulus is applied to the payload directly (n mod 97), NOT to the IBAN-style ISO 7064 MOD 97-10 variant (98 - (n*100 mod 97)) that lives in the same file — this generator calls the plain mod97, not iso7064Mod9710CheckDigits.
- The check is subtracted from 97, not 98; using 98 would be the wrong (ISO 7064) formula.
- Leading zeros in the 8-digit payload matter for the string representation but are numerically ignored when computing the modulo.
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 enterprise 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 10-digit enterprise number (default), or BE VAT number. |
| invalid | boolean | Return an enterprise number with a deliberately wrong check. |
| seed | integer | Integer seed for reproducible output: the same seed always yields the same record. |
Response fields
| Field | Type | Description |
|---|---|---|
| value | string | The number in the requested format (national or VAT). |
| digits | string | The canonical, unprefixed 10-digit enterprise number. |
Other generators for Belgium
Belgian companyBelgian company nameBelgian email addressBelgian IBANBelgian personBelgian person nameBelgian product or service offeringBelgian RijksregisternummerBelgian vehicle registration plate
See all generators for Belgium →The same kind of identifier elsewhere
Austrian data · Austrian FirmenbuchnummerAustrian data · Austrian SteuernummerAustrian data · Austrian UIDBulgarian 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 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