Generator · Slovak data

Slovak rodné číslo

Endpoint GET /v1/sk/rodne-cislo

What it covers

Returns a valid Slovak rodné číslo with a correct divisible-by-11 check. 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` rendering. Set `invalid=true` for a deliberately wrong check digit.

How it’s calculated

The Slovak rodné číslo carries a single check digit chosen so the full 10-digit number is divisible by 11, computed inline as C = (11 − ((firstNine × 10) mod 11)) mod 11.

Algorithm

  1. Assemble the first six digits as YYMMDD from the birth date: two-digit year (year mod 100), two-digit month, two-digit day — each zero-padded.
  2. Apply the sex offset to the month before padding: for females add 50 to the month (so 01–12 becomes 51–62); for males leave the month as 01–12. (This affects only the month field, not the checksum rule itself.)
  3. Append a 3-digit serial number (000–999, zero-padded) to form the 9-digit head 'firstNine' = YYMMDD + SSS.
  4. Read firstNine as an integer numberNine.
  5. Multiply by 10: t = numberNine × 10. (This is equivalent to weighting the check digit position with weight 1 and reducing modulo 11.)
  6. Compute r = t mod 11.
  7. Compute the check digit C = (11 − r) mod 11.
  8. If C === 10 there is no valid single decimal digit — discard this serial, draw a new 3-digit serial, and repeat from step 3.
  9. Otherwise the 10-digit rodné číslo is firstNine followed by C. By construction the resulting 10-digit number is exactly divisible by 11.

Worked example

Male born 1990-06-15, serial 123 → 900615123?

YY = 90, MM = 06 (male, no +50 offset), DD = 15 → date head = 900615
serial = 123 → firstNine = 900615123
numberNine = 900615123
t = numberNine × 10 = 9006151230
r = 9006151230 mod 11 = 10
C = (11 − 10) mod 11 = 1 mod 11 = 1
C = 1 is a valid single digit (not 10), so it is accepted
Full number = 9006151231; check: 9006151231 mod 11 = 0 (divisible by 11)

The check digit is 1, giving the full rodné číslo 9006151231 (formatted 900615/1231).

Edge cases

  • When (11 − ((firstNine × 10) mod 11)) mod 11 evaluates to 10, no single decimal check digit exists; the generator rejects that serial and redraws rather than emitting an 11-digit or truncated value.
  • The month field encodes sex: females have 50 added to the month (06 → 56), males keep 01–12. This changes the YYMMDD digits (and therefore the checksum input) but the divisibility-by-11 rule is applied identically to whatever the resulting first nine digits are.
  • The two-digit year carries no separate century marker: YY 00–53 maps to the 2000s and YY 54–99 maps to the 1900s, constraining the encodable range to birth dates 1954-01-01 through 2053-12-31.

Gotchas

  • The check digit is NOT a standard weighted mod-11 over positional weights; it is derived by multiplying the 9-digit head by 10 and taking the complement mod 11 — algebraically this is the digit that makes the whole 10-digit number ≡ 0 (mod 11).
  • This generator emits only 10-digit numbers within 1954–2053 and never uses the historical Czech/Slovak +20/+70 month overflows that extend the serial space, so those variants will not appear in its output.
  • Because C = 10 serials are redrawn, roughly 1 in 11 candidate serials for a given date is silently skipped; the emitted serials are therefore not a contiguous 000–999 range for that date.

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 `YYMMDD/SSSC`.
invalidbooleanReturn a number with a deliberately wrong 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 number in the requested format (plain or `YYMMDD/SSSC`).
digitsstringThe canonical 10-digit number.
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 Slovakia

See all generators for Slovakia →

The same kind of identifier elsewhere

Try it

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