Brazilian CPF Generator
Generate valid Brazilian CPF numbers for testing. Includes checksum validation, state/region selection, and formatting options.
Validator
Enter a CPF to check region and validity instantly.
Bulk Generation
About
This tool generates mathematically valid CPF (Cadastro de Pessoas FΓsicas) numbers for software testing, database verification, and QA processes. It utilizes the standard Modulus 11 algorithm defined by the RFB (Receita Federal do Brasil) to calculate the two check digits (J and K). These numbers satisfy the checksum requirements but do not correspond to real individuals.
The tool also allows you to simulate CPFs from specific fiscal regions by fixing the 9th digit. Incorrect implementation of CPF validation is a common source of bugs in Brazilian e-commerce and fintech applications; this generator ensures your test data is accurate.
Formulas
A CPF number consists of 9 base digits and 2 verifier digits: d1...d9-J K.
Step 1: Calculate First Check Digit (J)
Then, the digit J is determined by the remainder:
If r = 10, then J = 0; otherwise J = r.
Step 2: Calculate Second Check Digit (K)
Similar to the first step, K is derived from S2.
Reference Data
| 9th Digit | Fiscal Region (States) |
|---|---|
| 1 | DF, GO, MS, MT, TO |
| 2 | AC, AM, AP, PA, RO, RR |
| 3 | CE, MA, PI |
| 4 | AL, PB, PE, RN |
| 5 | BA, SE |
| 6 | MG |
| 7 | ES, RJ |
| 8 | SP |
| 9 | PR, SC |
| 0 | RS |