Test data for Brazilian software
EN
Fictitious data for software testing. Using fake documents for fraud is a crime in Brazil (Penal Code, arts. 297–299, 307).

Título de eleitor generator and validator

The título de eleitor is Brazil’s voter registration card, issued by the Superior Electoral Court (TSE). Generate fictitious 12-digit registration numbers with a state code and modulo-11 check digits for form tests, integrations and staging data.

—

Up to 1000 items at once. Everything is generated in your browser.

How to use

  1. Pick the UF (state) of registration, or ZZ for voters living abroad. With no choice, one of the 27 states is drawn at random.
  2. Tick With mask (punctuation) to get 0000 0000 0000; unticked, you get 12 plain digits.
  3. Click Generate, then Copy.
  4. For bulk data, set the Quantity (1–1000) and use Export CSV or Export JSON.
  5. On the Validate tab, paste one or many numbers, one per line; each line shows valid with its state, or the reason it failed.

How it works

How the number is built

TSE Resolution No. 21,538/2003 (article 12) defines a 12-digit registration number: 8 sequential digits, a 2-digit state code and 2 modulo-11 check digits — the first computed over the sequence and the second over the state code followed by the first check digit.

CodeUFCodeUFCodeUF
01SP11MA21SE
02MG12PB22AM
03RJ13PA23RO
04RS14ES24AC
05BA15PI25AP
06PR16RN26RR
07CE17AL27TO
08PE18MT28ZZ (abroad)
09SC19MS
10GO20DF

Check-digit rule

  1. First digit: multiply the 8 sequential digits by the weights 2, 3, 4, 5, 6, 7, 8, 9, add them and take the remainder modulo 11.
  2. Second digit: compute (first state-code digit × 7 + second state-code digit × 8 + first check digit × 9) mod 11.
  3. In both, a remainder of 10 becomes 0. SP and MG exception (codes 01 and 02): a remainder of 0 becomes 1. This exception is not in the resolution text; it is the convention used by widely adopted validators and by this tool.

Worked example: 4182 7365 06??

Sequence 41827365, state code 06 (PR). First digit: 4×2 + 1×3 + 8×4 + 2×5 + 7×6 + 3×7 + 6×8 + 5×9 = 8 + 3 + 32 + 10 + 42 + 21 + 48 + 45 = 209. 209 mod 11 = 0.

Second digit: 0×7 + 6×8 + 0×9 = 48. 48 mod 11 = 4. Result: 4182 7365 0604.

With the same sequence in SP (01), the first remainder 0 becomes 1, and the second digit is 0×7 + 1×8 + 1×9 = 17, remainder 6: 4182 7365 0116.

FAQ

Is a generated number registered with the TSE?

There is no such guarantee. The number is random and only follows the structure and check-digit rule; the tool never queries the electoral courts. The status of a real voter registration can only be checked through official TSE services. Use these numbers for testing and demos only.

What does the ZZ state mean?

It is code 28, used for voters who live outside Brazil. The generator only produces ZZ when you select it explicitly; the random draw covers the 26 states and the Federal District. The validator recognises code 28 and reports ZZ in the result.

Why do SP and MG have a different rule?

For these two states, when the modulo-11 remainder is 0 the check digit becomes 1, for both digits. The rule is not spelled out in Resolution No. 21,538/2003, but reference validators apply it, and an SP or MG number computed without it fails validation.

Why was a 12-digit number rejected?

Besides length, the validator checks that the 9th and 10th digits form a state code from 01 to 28 and that both check digits match. A code such as 29 or 00 triggers an invalid-state error; a mismatching check digit triggers a check-digit error.

Can I use these numbers in real systems?

No. They are fictitious and intended for fixtures, form tests, staging environments and database seeds. Do not use them to sign up for services, impersonate a voter or get around any verification.

Sources

Related tools

Updated 2026-11-13 · Rafael Lima