Detectors
Steuer-ID
Detect and validate German tax identification numbers with ISO 7064 MOD 11,10 checksum.
Purpose
Use the steuer_id detector for German tax identification numbers (Steuerliche Identifikationsnummer).
Detector Name
steuer_idSupported Formats
- 11 digits
German Steuer-ID always consists of exactly 11 digits.
Validation Logic
- Require exactly 11 digits.
- The first digit must not be
0. - Run the ISO 7064 MOD 11,10 checksum.
Checksum Algorithm (ISO 7064 MOD 11,10)
- Start with a product of
10. - For each digit position 1-10:
- Add the digit to the product.
- Take
sum % 10. If0, replace with10. - Multiply by
2. - Take
product % 11.
- The checksum digit (position 11) must equal
(11 - product) % 10.
Python Examples
Explicit Engine (Recommended)
from fastpii import FastPII
from fastpii.countries.de import GermanPack
priority = {"steuer_id": 100, "email": 70, "name": 50, "phone": 20}
engine = FastPII(priority=priority)
engine.register(GermanPack())
result = engine.detect("Steuer-ID: 86095742719", detector_names=["steuer_id"])Convenience API
from fastpii import PrivacyGuard
guard = PrivacyGuard(regions=["de"])
result = guard.validate("86095742719", "steuer_id")
print(result.is_valid)Convenience API — Detect in free text
from fastpii import PrivacyGuard
guard = PrivacyGuard(regions=["de"])
result = guard.detect("Steuer-ID: 86095742719")
for finding in result.findings:
print(finding.type, finding.value)Limitations
- Steuer-ID is specific to German tax identification.
- The first digit must not be
0. - No digit may repeat more than 3 times consecutively (per official specification).