Skip to main content
Skip to main content

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:

PositionFieldLengthMeaning & RuleExample
1 to N-1State Tax NumberVaries by statePrefix and sequential tax registration number issued by SEFAZ12345678
NCheck Digit(s)1 or 2 digitsIntegrity checksum digits computed under state rules9

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. 1. Identify the issuing state and its official length (e.g. SP 12, RJ 8, MG 13, RS 10, BA 8/9).
  2. 2. Apply posited weights defined by SINTEGRA regulations for that state.
  3. 3. Compute weighted sum across registration digits.
  4. 4. Calculate remainder modulo 10 or 11.
  5. 5. Derive check digit(s) matching SEFAZ rules.

Frequently Asked Questions (FAQ)