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
icoSupported Formats
8digits
Examples:
2559664100000019
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
- Take the first 7 digits.
- Multiply them by weights
8, 7, 6, 5, 4, 3, 2. - Sum the products.
- Compute
sum % 11. - Map the remainder to the expected check digit:
- remainder
0-> check digit1 - remainder
1-> check digit0 - remainder
2-10->11 - remainder
- remainder
- 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")