Skip to main content

Voter ID Generator

Generate valid Voter IDs, with option to filter by state. For testing.

Waiting for generation...

About the Voter ID Generator by State

The Box4Dev Voter ID Generator creates 12-digit numbers that are structurally valid, with the option to specify the issuing state (UF). Each number is generated with verification digits calculated according to the official algorithm of the Superior Electoral Court (TSE).

This resource is a support tool for development and QA teams. It allows testing registration forms and systems that have business rules based on the origin of the Voter ID, all in a safe development environment.

Anatomy & Structure of Brazilian Voter ID

The Voter Registration card contains 12 decimal digits in 3 segments:

PositionFieldLengthMeaning & RuleExample
1 to 8Sequential Number8 digitsSequential voter identity registration number04399701
9 & 10State Code (UF)2 digitsState code (01 for SP, 02 for MG up to 28 for TO and 29 abroad)01
11 & 12Check Digits2 digitsDual Modulo 11 check digits with specific TSE remainder rules59

Official Voter ID Algorithm (TSE Modulo 11)

The Electoral Court calculates check digits taking into account the state code and remainders 0 and 10:

CD1 = (Sum1 % 11); CD2 = ((d[8]*7 + d[9]*8 + CD1*9) % 11)
  1. 1. Multiply first 8 digits by weights 2 to 9.
  2. 2. Evaluate remainder modulo 11.
  3. 3. If remainder is 10, CD1 is 0. If 0 and state is 01 (SP) or 02 (MG), CD1 is 1; else 0.
  4. 4. Multiply state digits by 7 and 8, and CD1 by 9.
  5. 5. Evaluate remainder modulo 11 with same state 01/02 rule.
  6. 6. Compare with digits 11 and 12.

Frequently Asked Questions (FAQ)