UtiliTools

CPF Generator

Generate random valid Brazilian CPF numbers for software testing. Choose whether you want formatting and which Brazilian state the CPF should belong to, then click generate and copy the result.

Want to validate instead?

What is a CPF?

The CPF (Cadastro de Pessoas Físicas) is the Brazilian individual taxpayer ID, a unique number that identifies every person in Brazil. It is required for bank accounts, online purchases, sign-up forms and government services, so almost every Brazilian system has a CPF field that needs test data.

How does a CPF number work?

A CPF has 11 digits. The last two are check digits, calculated from the first nine with a specific algorithm (weighted sums and modulo 11). That is what makes a number mathematically valid and lets systems catch typos.

How do I know which state a CPF is from?

The state where a CPF was issued is defined by its 9th digit (the last one before the check digits). Here is the mapping:

  • 0 — Rio Grande do Sul
  • 1 — Federal District, Goiás, Mato Grosso, Mato Grosso do Sul and Tocantins
  • 2 — Pará, Amazonas, Acre, Amapá, Rondônia and Roraima
  • 3 — Ceará, Maranhão and Piauí
  • 4 — Pernambuco, Rio Grande do Norte, Paraíba and Alagoas
  • 5 — Bahia and Sergipe
  • 6 — Minas Gerais
  • 7 — Rio de Janeiro and Espírito Santo
  • 8 — São Paulo
  • 9 — Paraná and Santa Catarina

NOTE: This CPF generator is intended exclusively for educational purposes and software testing. The numbers are random and follow the real CPF validation rules, but they do not belong to real people. We are not responsible for any misuse of this tool. If you run into any problems, please contact us.

Frequently asked questions

Does a generated CPF belong to a real person?

No. The numbers are created at random and pass the check digit calculation, but they are not linked to anyone. They are meant only for testing systems and forms.

Can I use a generated CPF to sign up for services?

No. Using someone else's or a made-up CPF to impersonate a person is a crime in Brazil. The generator exists so developers and QA testers can test their systems.

How do I generate a CPF from a specific Brazilian state?

Pick the state in the State field before generating. The ninth digit of a CPF indicates the tax region where it was issued, and the generator uses the digit that matches the chosen state.

How do CPF check digits work?

The last two digits are calculated from the first nine using weighted sums and the remainder of a division by 11. This lets systems detect typos.

See also:

UtiliTools · by Viniciusadm · 2023 - 2026