Pular para o conteúdo
Tool

CPF Generator

Generate valid and fictitious CPF numbers for testing, or validate an existing CPF and see the origin status, all in the same tool.

Os números gerados são aleatórios e matematicamente válidos apenas quanto aos dígitos verificadores. Não pertencem a pessoas reais e não são consultados em bases oficiais. Destinam-se exclusivamente a testes de sistemas. Utilizar documentos falsos para fraude é crime (art. 299 do Código Penal).

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:

  1. Choose the options: decide if you want the number formatted with dots and dashes and, if desired, select the state (tax region).
  2. Define the quantity: enter how many CPFs you need, if you are going to generate them in batch.
  3. Click on generate: the tool creates the numbers instantly, directly in your browser.
  4. 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)?

  1. We multiply the first 9 digits by decreasing weights (from 10 to 2).
  2. We add up all the results.
  3. 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.
  4. We repeat the process using the first 10 digits and weights from 11 to 2 to find the second check digit.

Perguntas frequentes

Is the CPF generated really valid?

The number is mathematically valid, that is, it has the correct check digits according to the Federal Revenue algorithm. However, it is fictional and does not belong to any real person. It is only used to test forms and systems.

Does the generated CPF pass the Federal Revenue consultation?

No. The number generated does not exist in the Federal Revenue database, so the registration status query does not return anything. It is only mathematically valid, which is enough to test forms and systems that check check digits.

Can I use this CPF in a real registration?

No. The numbers are used exclusively for testing software in development environments. Using a false CPF to impersonate another person or defrauding registrations is a crime provided for by law.

Is it a crime to generate a CPF?

Generating random numbers to test software is not a crime, as they do not belong to anyone. The crime is misuse: presenting a CPF that is not yours in a registration, contract or document constitutes ideological falsehood (art. 299 of the Penal Code).

Can the generated CPF be the same as that of a real person?

It's possible, but very unlikely. The numbers are drawn at random and the tool does not consult any database, so a coincidence would be pure chance. This is yet another reason to only use the numbers in a test environment, never in real records.

How to generate multiple CPFs at once?

Just enter the desired quantity and click generate. The tool creates CPFs in batch at once, ready to copy or download in .txt and use in your spreadsheet or test database.

Can I generate CPF with dots and dashes?

Yes. You choose whether you want the number formatted in the standard 000.000.000-00 or just the digits, as your system requires. Just check the option before generating.

How do you know which state a CPF is from?

The 9th digit of the CPF indicates the Tax Region where it was issued, according to the table on this page. For example, CPFs with 8 in this position are from São Paulo. Paste the number into CPF Validator to see the originating state at the time.

Do I need to pay or register to use it?

No. The generator is completely free, works online and without login. Everything is generated directly in your browser, as many times as you need.

Can you validate a CPF on this same page?

Yes. Just above the form there is the "CPF Validator" tab: switch to it, paste the number and immediately see if it is mathematically valid and the state of origin, without having to leave this page.

Does the generator also create a name or date of birth along with the CPF?

No, this tool only generates the CPF number. If your test form also asks for name and date of birth, use any dummy text and date in these fields: they don't follow a mathematical validation rule like CPF, so any test value will work.

Sobre este conteúdo

Escrito por:
Equipe Ferramenta Grátis
Atualizado em:
3 de julho de 2026

Ferramentas relacionadas

Valid Online and Free CPF Generator for System Testing