Generator · Slovak data

Slovak IČ DPH

Endpoint GET /v1/sk/ic-dph

What it covers

Returns a valid Slovak IČ DPH (VAT identification number) — 10 digits divisible by 11 with the scheme positional constraints. Use `format` for the `SK`-prefixed VAT form. Set `invalid=true` for a deliberately wrong check.

How it’s calculated

The Slovak IC DPH check rule is that the whole 10-digit number is exactly divisible by 11; the last digit acts as the completing check digit (with first digit non-zero and third digit in {2,3,4,7,8,9}).

Algorithm

  1. Start from the 9-digit payload d1 d2 ... d9 (d1 is the first / leftmost digit). Positional constraints for a well-formed IC DPH: d1 must be non-zero (1-9) and d3 must be one of {2,3,4,7,8,9}.
  2. The check digit is the 10th (rightmost) digit d10. It is chosen so that the entire 10-digit number d1 d2 ... d10, read as a base-10 integer, is exactly divisible by 11 (i.e. number mod 11 === 0). There are no per-position weights and no complement step — the rule is plain divisibility of the whole number by 11.
  3. To find d10 by hand, compute the divisibility-by-11 residue of the number using the alternating digit sum: sum the digits in odd positions counting from the right and subtract the digits in even positions from the right; the number is divisible by 11 iff that alternating sum is congruent to 0 (mod 11).
  4. Concretely: form the number d1..d9 followed by a trial d10 and compute (d1..d9d10) mod 11. Increase d10 across 0..9 until the result is 0. Because incrementing d10 by 1 changes the number by 1 (mod 11), at most one value of d10 in 0..9 makes the number divisible by 11; that value is the check digit.
  5. If no digit 0..9 satisfies divisibility for a given 9-digit prefix (this happens when the required residue is 10), that prefix has no valid check digit; the RFD generator simply redraws digits and retries until a divisible-by-11 number is produced.
  6. Verification of an existing IC DPH: confirm it is exactly 10 digits, d1 != 0, d3 in {2,3,4,7,8,9}, and (whole 10-digit number) mod 11 === 0.

Worked example

IC DPH payload 402030405? (first digit 4, third digit 2, one check digit to find)

Payload (9 digits): 4 0 2 0 3 0 4 0 5. Check constraints: d1 = 4 (non-zero, OK); d3 = 2 (in {2,3,4,7,8,9}, OK).
Find the last digit d10 so that 402030405d10 is divisible by 11. Use the alternating digit sum from the right on the full 10-digit number for each trial.
Try d10 = 7 -> number 4020304057. Digits from the right: 7,5,4,0,3,0,2,0,4. Wait — write all 10 from right: 7(pos1,+), 5(pos2,-), 0(pos3,+), 4(pos4,-), 0(pos5,+), 3(pos6,-), 0(pos7,+), 2(pos8,-), 0(pos9,+), 4(pos10,-).
Odd-position (from right) digits: 7 + 0 + 0 + 0 + 0 = 7. Even-position digits: 5 + 4 + 3 + 2 + 4 = 18.
Alternating sum = 7 - 18 = -11. -11 mod 11 = 0, so 4020304057 is divisible by 11.
Confirming directly: 4020304057 / 11 = 365482187 exactly, so 4020304057 mod 11 = 0. The check digit is 7.

The check digit is 7, giving the full IC DPH 4020304057 (VAT form: SK4020304057).

Edge cases

  • The first digit d1 is constrained to be non-zero (1-9).
  • The third digit d3 is restricted to the set {2,3,4,7,8,9} — values 0,1,5,6 are never valid in that position.
  • Some 9-digit prefixes admit no valid check digit (when the completing residue would be 10, which no single digit can supply); the generator redraws in that case rather than emitting an invalid number.

Gotchas

  • There is no isolated weighted check-digit computation: the checksum is the property that the FULL 10-digit number is divisible by 11, computed inline in the generator (Number(digits) % 11 === 0), not via a shared mod11/luhn primitive.
  • The Slovak VAT presentation prefixes 'SK' (e.g. SK4020304057), but the 'SK' letters are NOT part of the checksum — divisibility applies only to the 10 digits.
  • The 'invalid' variant breaks the checksum by perturbing only the last digit by 1..9 (mod 10), which shifts the number by a non-multiple of 11 and guarantees divisibility fails while keeping the positional first/third-digit rules intact.

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 numbers from the boundaries.
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"national" | "vat"Rendering: bare 10-digit number (default) or `SK`-prefixed VAT form.
invalidbooleanReturn a number with a deliberately wrong divisible-by-11 check.
seedintegerInteger seed for reproducible output: the same seed always yields the same record.

Response fields

FieldTypeDescription
valuestringThe number in the requested format (national or `SK`-prefixed VAT).
digitsstringThe canonical, unprefixed 10-digit number.

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.