Generator · Belgian data

Belgian Rijksregisternummer

Endpoint GET /v1/be/rijksregisternummer

What it covers

Returns a valid Belgian Rijksregisternummer (RRN) with correct check digits. Constrain with `sex` and age/birth-date filters (the full birth date is encoded). Use `kind=bis` for a BIS-number. Contradictory combinations are rejected with a 400. Set `invalid=true` for deliberately wrong check digits.

The two-digit year cannot distinguish 1900s from 2000s births, so the checksum itself carries the century marker: for births in 2000 or later, a literal digit '2' is prepended to the nine-digit payload before the modulo is taken (i.e. `97 − ((2 followed by first9) mod 97)`). Validators must try both bases when the century is unknown.

How it’s calculated

The two RRN check digits are the mod-97 complement of the nine payload digits — `97 − (first9 mod 97)` — with a literal '2' prepended to the payload for births in the year 2000 or later to disambiguate the century.

Algorithm

  1. Take the first nine digits of the RRN (the payload): a 6-digit YYMMDD date head followed by a 3-digit serial. This is the string called `firstNine`.
  2. Determine the birth year. If the birth year is 2000 or later, prepend the single digit '2' to the front of the nine-digit payload, forming a 10-character basis string. If the birth year is 1999 or earlier, use the nine-digit payload unchanged as the basis.
  3. Interpret the basis string as one large integer and compute its remainder modulo 97 (mod97 uses BigInt: `Number(BigInt(basis) % 97n)`).
  4. Compute the two check digits as `97 - (basis mod 97)`.
  5. Zero-pad the result to exactly two digits (e.g. 7 -> '07').
  6. Append these two check digits to the nine payload digits to form the full 11-digit RRN.

Worked example

RRN for a male born 1990-05-23, serial 001: 900523001??

Payload (first nine digits) = 900523001 (YY=90, MM=05, DD=23, serial=001).
Birth year 1990 is before 2000, so no '2' prefix — basis = 900523001.
900523001 mod 97 = 27.
Check = 97 − 27 = 70.
Zero-pad to two digits: '70' (already two digits).
Full RRN = 900523001 followed by 70 = 90052300170.

The check digits are 70, giving the full RRN 90052300170.

Edge cases

  • The month field of the date head carries a BIS offset for non-national numbers: +40 when the sex is known, +20 when it is not; the actual month/day/year are never altered, so the birth date is recoverable by subtracting the offset before checksum validation still applies to the offset digits as written.
  • The serial (digits 7-9) is clamped to 001..998; the registry never issues serial 000 or 999.
  • Serial parity encodes sex: odd serial = male, even serial = female.

Gotchas

  • The check is a plain complement (97 minus the remainder), NOT the ISO 7064 MOD 97-10 IBAN-style scheme. Do not use `98 - (payload*100 mod 97)` — this generator calls the plain `mod97()` and subtracts from 97.
  • The '2' prefix for years ≥ 2000 is a literal string concatenation on the front of the nine digits before the BigInt conversion, changing the modulo result — it is not an arithmetic add of 2,000,000,000 done separately (though the source comment describes it that way, the code does string prepend).
  • A remainder of 0 yields check digits '97', which is a valid RRN check value.

Parameters

ParameterTypeDescription
atAgeintegerExact age in years at request time.
bornAfterstringpattern ^\d{4}(?:-\d{2}(?:-\d{2})?)?$Born after this date or fragment (YYYY, YYYY-MM, YYYY-MM-DD).
bornBeforestringpattern ^\d{4}(?:-\d{2}(?:-\d{2})?)?$Born before this date or fragment (YYYY, YYYY-MM, YYYY-MM-DD).
bornOnstringpattern ^\d{4}(?:-\d{2}(?:-\d{2})?)?$Born on a date or within a fragment: YYYY, YYYY-MM, or YYYY-MM-DD.
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 edge-case values.
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 RRN with deliberately wrong check digits; birth date/sex stay valid.
kind"national" | "bis"Number kind: ordinary national RRN (default) or a BIS-number.
olderThanintegerMinimum age in years at request time.
seedintegerInteger seed for reproducible output: the same seed always yields the same record.
sex"m" | "f"Encoded sex: "m" or "f".
youngerThanintegerMaximum age in years at request time.

Response fields

FieldTypeDescription
valuestringThe 11-digit RRN rendered as bare digits.
digitsstringThe canonical 11-digit RRN.
birthDatestringThe encoded birth date, ISO `YYYY-MM-DD`.
sex"m" | "f"Encoded sex: `m` (odd serial) or `f` (even serial).

Other generators for Belgium

See all generators for Belgium →

The same kind of identifier elsewhere

Try it

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