FastPII Docs
Detectors

IČO

Detect and validate Czech company identification numbers with weighted MOD 11 checksum rules.

Purpose

Use the ico detector for Czech company identification numbers (IČO).

This detector is built for 8-digit business IDs and reports accuracy above 99%.

It validates the official weighted checksum and exposes whether the checksum passed.

Detector Name

ico

Supported Formats

  • 8 digits

Examples:

  • 25596641
  • 00000019

The validator removes spaces before checking the value.

Validation Logic

The detector requires exactly 8 digits.

It then validates the last digit using a weighted MOD 11 algorithm.

Checksum Algorithm

  1. Take the first 7 digits.
  2. Multiply them by weights 8, 7, 6, 5, 4, 3, 2.
  3. Sum the products.
  4. Compute sum % 11.
  5. Map the remainder to the expected check digit:
    • remainder 0 -> check digit 1
    • remainder 1 -> check digit 0
    • remainder 2-10 -> 11 - remainder
  6. Compare the expected check digit with the 8th digit.

Python Examples

Validate an IČO

from fastpii import PrivacyGuard

guard = PrivacyGuard(regions=["cz"])
result = guard.validate("25596641", "ico")

print(result.is_valid)
print(result.metadata)

Detect an IČO in text

from fastpii import PrivacyGuard

guard = PrivacyGuard(regions=["cz"])
result = guard.detect("IČO: 25596641", detector_names=["ico"])

for finding in result.findings:
    print(finding.value, finding.metadata)

Expected Metadata

This detector returns:

  • checksum_valid

Example Output

{
    "checksum_valid": True,
}

Limitations

  • FastPII expects the business ID itself, not a prefixed form like CZ25596641.
  • Values longer than 8 digits are rejected.
  • The detector does not add company registry enrichment.

Notes

Verified validation example from the codebase:

guard.validate("25596641", "ico")

On this page