Generator · Dutch data

Dutch RSIN

Endpoint GET /v1/nl/rsin

What it covers

Returns a valid Dutch RSIN (Rechtspersonen en Samenwerkingsverbanden Informatienummer) with a correct elfproef check. The RSIN is non-semantic. Set `invalid=true` for an RSIN with a deliberately wrong check digit, or `edge=true` for valid edge-case numbers.

How it’s calculated

The RSIN's final digit is a weighted-sum modulo-11 check digit (the Dutch "elfproef"), identical to the BSN scheme, taken as the raw remainder of the weighted sum of the eight leading digits.

Algorithm

  1. Take the 8 leading payload digits d1..d8 (left to right). The 9th digit is the check digit to be computed.
  2. Assign fixed position weights to the payload digits: d1=9, d2=8, d3=7, d4=6, d5=5, d6=4, d7=3, d8=2.
  3. Compute the weighted sum: sum = 9*d1 + 8*d2 + 7*d3 + 6*d4 + 5*d5 + 4*d6 + 3*d7 + 2*d8.
  4. Reduce modulo 11: base = sum mod 11 (a value 0..10).
  5. The check digit is the raw remainder itself: check = base (this is the 'remainder' style, not the 11-complement).
  6. Overflow rule ('invalid'): if base equals 10 there is no single-digit check digit, so the prefix is 'not issued' — discard it and redraw a new payload. (base can never be 11 here, since it is already a mod-11 remainder.)
  7. Append the check digit to the 8 payload digits to form the full 9-digit RSIN d1..d8,check.

Worked example

RSIN 12345678?

Payload digits: [1,2,3,4,5,6,7,8], weights [9,8,7,6,5,4,3,2].
Products: 9*1=9, 8*2=16, 7*3=21, 6*4=24, 5*5=25, 4*6=24, 3*7=21, 2*8=16.
Sum = 9+16+21+24+25+24+21+16 = 156.
156 mod 11: 11*14 = 154, remainder = 156 - 154 = 2.
Style 'remainder' -> raw check = 2. Overflow 'invalid': 2 is neither 10 nor 11, so it stands.
Check digit = 2.

The check digit is 2, giving the full RSIN 123456782.

Edge cases

  • When the weighted sum of the eight leading digits is congruent to 10 (mod 11), no single digit satisfies the elfproef, so that prefix is 'dead' — the generator returns undefined and redraws (generateRsinDigits loops until a valid prefix is found).
  • The common-shape generator draws the first digit in the range 1..9 (no leading zero); leading-zero forms are reserved for the edge generator.
  • The check digit is the raw remainder, not the 11-complement — this matches the BSN scheme, because the full elfproef weight on the 9th (check) digit is -1.

Gotchas

  • RSIN uses the same elfproef (weights 9,8,7,6,5,4,3,2 and the -1 on the 9th digit) as the 9-digit BSN, so an RSIN passes the BSN check too; they share number space but are semantically different (RSIN identifies legal entities/partnerships, BSN identifies natural persons).
  • Because the ninth-digit weight is -1, the check equals the plain weighted sum of the first eight digits mod 11 (remainder style) — do NOT apply an 11-complement, which would give the wrong digit.
  • Digit strings must never round-trip through Number: leading zeros are significant, so arithmetic is done on the digit array via toDigits.

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 RSINs from the rare corners.
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 an RSIN with a deliberately wrong elfproef check digit.
seedintegerInteger seed for reproducible output: the same seed always yields the same record.

Response fields

FieldTypeDescription
valuestringThe RSIN rendered as a 9-digit string.
digitsstringThe canonical 9-digit RSIN.

Other generators for Netherlands

See all generators for Netherlands →

The same kind of identifier elsewhere

Try it

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