Generator · Czech data

Czech rodné číslo

Endpoint GET /v1/cz/rodne-cislo

What it covers

Returns a valid Czech rodné číslo (birth number) divisible by 11. Constrain with `sex` and age/birth-date filters (the full birth date is encoded). Contradictory combinations are rejected with a 400. Use `format` for the `YYMMDD/SSSC` slash rendering. Set `invalid=true` for a deliberately wrong divisibility check.

How it’s calculated

The Czech rodné číslo's 10th digit is a mod-11 check digit chosen so the entire 10-digit number is divisible by 11.

Algorithm

  1. Build the first nine digits as a string: the 6-digit YYMMDD date head followed by a 3-digit serial SSS. The date head is the two-digit year (year mod 100), the two-digit month (for women the month has +50 added, giving 51-62), and the two-digit day, each zero-padded to width 2. The serial SSS is a value 000-999, zero-padded to width 3.
  2. Read those first nine digits as a single integer n9.
  3. Compute (n9 * 10) mod 11.
  4. Compute the check digit C = (11 - ((n9 * 10) mod 11)) mod 11.
  5. If C equals 10 there is no valid single check digit for this serial; discard it, draw a new serial SSS, and repeat from step 1.
  6. Otherwise C is a single digit 0-9. Append it as the 10th digit. The full 10-digit number is then divisible by 11 (n9*10 + C is a multiple of 11).

Worked example

Male born 1985-06-15, serial 123 → rodné číslo 850615123?

Date head: year 1985 → YY = 85; month 06 → MM = 06 (male, no +50 offset); day 15 → DD = 15. Head = 850615.
Serial SSS = 123. First nine digits = 850615123, so n9 = 850615123.
n9 mod 11: 850615123 = 11 * 77328647 + 6, so n9 mod 11 = 6.
(n9 * 10) mod 11 = (6 * 10) mod 11 = 60 mod 11 = 5.
C = (11 - 5) mod 11 = 6 mod 11 = 6.
C = 6, not 10, so it is accepted. Full number = 8506151236, and 8506151236 / 11 = 773286476 exactly (divisible by 11).

The check digit is 6, giving the full rodné číslo 8506151236 (formatted with slash: 850615/1236).

Edge cases

  • When (11 - ((n9*10) mod 11)) mod 11 evaluates to 10, no single decimal digit can serve as the check digit, so that serial is rejected and a fresh serial is drawn (this generator loops until a valid one appears).
  • Sex is encoded in the month: women's month field carries a +50 offset, so the encoded month is 01-12 for men and 51-62 for women.
  • Only the modern post-1954 10-digit form is produced; the two-digit year disambiguates century by a fixed cutoff (YY < 54 → 2000s, YY 54-99 → 1900s), limiting the encodable range to 1954-2053.

Gotchas

  • The check uses n9 * 10 (the nine payload digits shifted into the tens place) inside the mod-11, not n9 directly — this is equivalent to requiring the full 10-digit number to be divisible by 11.
  • The final mod 11 wraps a raw result of 11 back to 0, so a check digit of 0 is legitimate; only a raw result of 10 is unissued and triggers a redraw.
  • The check digit is computed inline in build-rodne-cislo.ts; it does not call a shared number-tools primitive (mod11.ts etc.).

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 valid 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.
format"plain" | "with-slash"Rendering: bare 10 digits (default) or the `YYMMDD/SSSC` slash form.
invalidbooleanReturn a rodné číslo that fails the divisible-by-11 check; date/sex stay valid.
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 rodné číslo in the requested format (plain or `YYMMDD/SSSC`).
digitsstringThe canonical 10-digit rodné číslo.
birthDatestringThe encoded birth date, ISO `YYYY-MM-DD`.
sex"m" | "f"Encoded sex: `m` (month 01–12) or `f` (month 51–62).

Other generators for Czechia

See all generators for Czechia →

The same kind of identifier elsewhere

Try it

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