Generator · Dutch data
Dutch BSN
Endpoint GET /v1/nl/bsn
What it covers
Returns a valid Dutch BSN (Burgerservicenummer) with a correct elfproef check. The BSN is non-semantic — it encodes no birth date or sex. Set `invalid=true` for a BSN with a deliberately wrong check digit, or `edge=true` for valid edge-case numbers.
How it’s calculated
The Dutch BSN's ninth digit is an "elfproef" (11-test) check digit: the weighted sum of the eight payload digits modulo 11, where a residue of 10 marks a non-issued prefix.
Algorithm
- Start with the eight payload digits d1..d8 (the first digit is 1-9 for a normal BSN; 0 is allowed only in the leading-zero edge case).
- Assign fixed position weights to the eight payload digits, left to right: 9, 8, 7, 6, 5, 4, 3, 2.
- Compute the weighted sum: S = 9*d1 + 8*d2 + 7*d3 + 6*d4 + 5*d5 + 4*d6 + 3*d7 + 2*d8.
- Take the remainder R = S mod 11.
- If R equals 10, no single digit can satisfy the elfproef: the prefix is not a valid BSN and must be discarded (redraw). Otherwise the check digit c = R (a value 0-9).
- Append c as the ninth digit; the full BSN is d1 d2 d3 d4 d5 d6 d7 d8 c.
- The full elfproef equivalently reads Sum(w_i * digit_i) ≡ 0 (mod 11) over all nine digits with weights 9,8,7,6,5,4,3,2,-1; the -1 weight on the ninth digit makes c equal the mod-11 remainder of the first eight, exactly as computed above.
- Reject the all-zero number 000000000: it passes the arithmetic but is reserved and never issued.
Worked example
BSN with payload 12345678 and unknown check digit: 12345678?
Payload digits: d1..d8 = 1,2,3,4,5,6,7,8 with weights 9,8,7,6,5,4,3,2.
Products: 1*9=9, 2*8=16, 3*7=21, 4*6=24, 5*5=25, 6*4=24, 7*3=21, 8*2=16.
Weighted sum S = 9+16+21+24+25+24+21+16 = 156.
R = 156 mod 11: 11*14 = 154, so 156 - 154 = 2.
R = 2, which is not 10, so the check digit c = 2.The check digit is 2, giving the full BSN 123456782.
Edge cases
- Residue 10 has no valid single check digit, so such prefixes are treated as not-issued and redrawn.
- Leading-zero BSNs are valid: numeric parsing that drops the leading 0 truncates the number below nine digits — the generator has a dedicated leading-zero edge class.
- The all-zero number 000000000 satisfies the arithmetic but is reserved and explicitly rejected.
Gotchas
- Because the ninth digit carries weight -1 in the classic elfproef formulation, it must be subtracted, not added, when verifying the full nine-digit sum ≡ 0 (mod 11); the generator sidesteps this by computing c directly as the mod-11 remainder of the eight payload digits.
- Style is 'remainder' with the default 'invalid' overflow — the check digit is the raw remainder (0-9), never an 11-complement, and residue 10 yields undefined rather than mapping to another digit.
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 BSNs 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 a BSN with a deliberately wrong elfproef 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 BSN rendered as a 9-digit string. |
| digits | string | The canonical 9-digit BSN. |
Other generators for Netherlands
Dutch btw-idDutch companyDutch company nameDutch email addressDutch IBANDutch KvK numberDutch personDutch person nameDutch product or service offeringDutch RSINDutch vehicle registration plate
See all generators for Netherlands →The same kind of identifier elsewhere
Austrian data · Austrian SVNRBelgian data · Belgian RijksregisternummerBulgarian data · Bulgarian EGNCroatian data · Croatian JMBGCroatian data · Croatian OIBCypriot data · Cyprus TICCzech data · Czech rodné čísloDanish data · Danish CPREstonian data · Estonian isikukoodFinnish data · Finnish henkilötunnusFinnish data · Finnish Y-tunnusFrench data · French NIRGerman data · German Steuer-IdNrGreek data · Greek AFMGreek data · Greek AMKAHungarian data · Hungarian adóazonosító jelHungarian data · Hungarian személyi azonosítóHungarian data · Hungarian TAJIrish data · Irish PPSNItalian data · Italian Codice FiscaleLatvian data · Latvian personas kodsLithuanian data · Lithuanian asmens kodasLuxembourg data · Luxembourg matriculePolish data · Polish PESELPortuguese data · Portuguese NIFRomanian data · Romanian CNPSlovak data · Slovak rodné čísloSlovenian data · Slovenian davčna številkaSlovenian data · Slovenian EMŠOSpanish data · Spanish DNISpanish data · Spanish NIESwedish data · Swedish personnummer
Try it