Brazilian voter ID: what it is and how to test it
The título de eleitor is the voter registration number of the Brazilian electoral court (TSE). It has 12 digits and, unlike other documents, carries the state of registration inside: positions 9 and 10. That makes it a good test of forms that cross-check the state with the number.
For tests only. These numbers have a correct format and check digit but belong to no real person or account. Never use them to deceive, to open accounts or to bypass a check. The numbers on this page come from the same generator as the tool, with a fixed seed so that the examples do not change; the tool creates new ones at every click.
Structure of the number
12 digits: 8 of sequence, 2 of the state (01 São Paulo to 27 Tocantins, 28 for voters abroad) and 2 check digits. The tool lets you choose the state, and the table below lists the code of each one as the service generates it.
The check digit, step by step
The first check digit weights the 8 sequence digits with 2 to 9, sums them and takes the remainder by 11. The second takes the two state digits times 7 and 8 plus the first check digit times 9. In both, a remainder of 10 becomes 0, and a remainder of 0 becomes 1 when the state is São Paulo (01) or Minas Gerais (02).
Worked example with 4453 8794 0779:
| Position | Character | Value | Weight | Product |
|---|---|---|---|---|
| 1 | 4 | 4 | 2 | 8 |
| 2 | 4 | 4 | 3 | 12 |
| 3 | 5 | 5 | 4 | 20 |
| 4 | 3 | 3 | 5 | 15 |
| 5 | 8 | 8 | 6 | 48 |
| 6 | 7 | 7 | 7 | 49 |
| 7 | 9 | 9 | 8 | 72 |
| 8 | 4 | 4 | 9 | 36 |
First digit: sum = 260; 260 mod 11 = 7, so the first check digit is 7. The state digits are 07 (CE). Second digit: 0 x 7 + 7 x 8 + 7 x 9 = 119; 119 mod 11 = 9, so the second check digit is 9.
State codes (positions 9 and 10)
The service generates the voter ID of each state with its code; ZZ is the code for voters abroad.
| UF | Code | UF | Code | UF | Code | UF | Code |
|---|---|---|---|---|---|---|---|
| SP | 01 | MG | 02 | RJ | 03 | RS | 04 |
| BA | 05 | PR | 06 | CE | 07 | PE | 08 |
| SC | 09 | GO | 10 | MA | 11 | PB | 12 |
| PA | 13 | ES | 14 | PI | 15 | RN | 16 |
| AL | 17 | MT | 18 | MS | 19 | DF | 20 |
| SE | 21 | AM | 22 | RO | 23 | AC | 24 |
| AP | 25 | RR | 26 | TO | 27 | ZZ | 28 |
Valid examples
Five numbers generated by the tool with a fixed seed, each one accepted by its validator:
| Example (formatted) | Without mask | Validator |
|---|---|---|
4453 8794 0779 | 445387940779 | valid |
1543 4414 1210 | 154344141210 | valid |
9116 4346 1007 | 911643461007 | valid |
7997 5466 1783 | 799754661783 | valid |
1880 1308 0531 | 188013080531 | valid |
How the validator answers
The same first example, one with a changed ending and one truncated, checked by the validator:
| Value | Result | Reason |
|---|---|---|
4453 8794 0779 | valid | - |
445387940770 | invalid | the check digit should be 79 |
4453879407 | invalid | needs 12 digits |
Common mistakes
- A voter ID that fails only for São Paulo or Minas Gerais numbers usually has the special rule missing: a zero remainder gives 1 in those two states and 0 in the others.
- The old 10- and 11-digit numbers are not the current format; the validator expects the 12 digits, so pad or fix the number before checking.
Frequently asked questions
Which digits of the voter ID are the state?
Positions 9 and 10, just before the two check digits. 01 is São Paulo, 02 Minas Gerais, 03 Rio de Janeiro and so on; the table on this page shows all of them.
Does a valid number prove that someone is registered to vote?
No: only the electoral court can confirm a registration. The digits prove the structure, nothing else.
Can I use a Brazilian voter ID number generated here in a real system?
No. A number such as 4453 8794 0779 has a correct format and check, but nobody was issued it, and it may coincide with a real holder by chance. Use it in test environments, demos and automated tests that never leave your control.