State Registration Validator
Validate State Registrations from any Brazilian state. Excellent for QA.
About the State Registration Validator
The State Registration Validator checks if a registration is mathematically valid for any of the 27 Brazilian states. Each state has a specific algorithm with different formats and calculation rules.
This tool is essential for developers working with tax systems who need to validate state registrations from contributors in different states.
Anatomy & Structure of Brazilian State Tax ID
State registration numbers vary between 8 and 14 digits across state revenue secretariats:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 to N-1 | State Tax Number | Varies by state | Prefix and sequential tax registration number issued by SEFAZ | 12345678 |
| N | Check Digit(s) | 1 or 2 digits | Integrity checksum digits computed under state rules | 9 |
State Tax Registration Algorithm (SINTEGRA / 27 Brazilian States)
Each state revenue authority applies its dedicated Modulo 10 or Modulo 11 checksum formula:
CD = (Sum % Modulo); state-specific remainder and exception rules
- 1. Identify the issuing state and its official length (e.g. SP 12, RJ 8, MG 13, RS 10, BA 8/9).
- 2. Apply posited weights defined by SINTEGRA regulations for that state.
- 3. Compute weighted sum across registration digits.
- 4. Calculate remainder modulo 10 or 11.
- 5. Derive check digit(s) matching SEFAZ rules.