Updated: July 2026
The CPF Generator is a free online tool that creates CPF numbers with valid check digits using the official algorithm of Receita Federal do Brasil. It was made for those who need realistic test data when developing, reviewing or validating systems, without needing to use a real person's CPF.
What is it
CPF stands for Individual Taxpayer Registry, the number that identifies each taxpayer in Brazil. Every CPF follows a mathematical rule: the last two digits (the check digits) are calculated from the first nine. A number that does not respect this account is rejected by most forms.
This tool generates (or "creates", as many people are looking for) precisely numbers that pass this mathematical validation, but that do not belong to anyone. In other words, the CPF generated is "valid" in the sense that it has the correct digits, but it is a fictitious, test CPF that is not linked to any real person in the Federal Revenue database.
With it you can:
- Generate one CPF at a time or several at once (in batch), useful for filling out test tables and spreadsheets.
- Format with dots and dashes (000,000,000-00) or leave just the numbers, as your system expects.
- Choose the state (tax region), as the 9th digit indicates the region where the CPF would have been issued.
- Download the list in .txt when generated in batch, ready to import into the approval database.
- Validate a CPF on the same page: switch to the "CPF Validator" tab, right above, and instantly check whether an existing number is mathematically valid and what the state of origin is, without needing to open another tool.
Want more details about a specific number? The CPF Validator page has the same test with more explanation about the result. And if the test also asks for company data, CNPJ Generator follows the same logic.
Important: the numbers are used exclusively for testing software. Using a false CPF to impersonate another person, defrauding registrations or deceiving systems is a crime provided for by law. Never use this data for real purposes.
How to use
Using the generator is quick and does not require registration or installation:
- Choose the options: decide if you want the number formatted with dots and dashes and, if desired, select the state (tax region).
- Define the quantity: enter how many CPFs you need, if you are going to generate them in batch.
- Click on generate: the tool creates the numbers instantly, directly in your browser.
- Copy or download the result: click to copy and paste into your form, database or test spreadsheet. In batch you can also download everything in .txt.
Ready. You can generate as many times as you want, always for free.
The CPF algorithm and the Tax Region
The 9th digit of the CPF informs the issuing Tax Region (the State of origin):
| Digit | States (Tax Region) |
|---|---|
| 1 | DF, GO, MS, MT and TO |
| 2 | AC, AM, AP, PA, RO and RR |
| 3 | CE, MA and PI |
| 4 | AL, PB, PE and RN |
| 5 | BA and SE |
| 6 | MG |
| 7 | ES and RJ |
| 8 | SP |
| 9 | PR and SC |
| 0 | RS |
How do we calculate check digits (step by step)?
- We multiply the first 9 digits by decreasing weights (from 10 to 2).
- We add up all the results.
- We divide the sum by 11. If the remainder is less than 2, the first check digit is 0. Otherwise, we subtract the remainder from 11.
- We repeat the process using the first 10 digits and weights from 11 to 2 to find the second check digit.