esc
4 free tools

Brazil tools
CPF and CNPJ

Generate mathematically valid CPF and CNPJ numbers for testing software, and check whether a CPF or CNPJ has the right check digits, including the alphanumeric CNPJ introduced in July 2026. Everything runs in your browser.

File character carrying papers
CPF generatorGenerate valid CPF numbers to test forms and systems. CPF validatorType a CPF to check its two check digits. CNPJ generatorGenerate valid CNPJ numbers, numeric or alphanumeric, to test systems. CNPJ validatorType a CNPJ to check its two check digits.

Every person in Brazil has a CPF and every company a CNPJ, and both end in two check digits worked out with module 11. Developers need valid-looking numbers to test forms, and everyone else sometimes needs to check that a number was typed correctly. These tools do both, in your browser.

What the tools do

  • Gerador de CPF: random CPF numbers with valid check digits, optionally for a chosen fiscal region.
  • Validar CPF: checks the two check digits of a CPF.
  • Gerador de CNPJ: random CNPJ numbers, numeric or in the new alphanumeric format.
  • Validar CNPJ: checks the check digits of a numeric or alphanumeric CNPJ.

What check digits can’t tell you

A number with the right check digits isn’t necessarily registered, active or yours. To see a CPF’s status or a company’s registration, use the Receita Federal’s official services.

Questions

Do these tools look up names or companies?

No. They only work with the check digits. Nothing is looked up at the Receita Federal or sent anywhere.

Can I use a generated CPF as a real one?

No. Generated numbers are random and only meant for testing systems. Using someone else’s CPF, or a made-up one, as your own is not allowed.

What is the alphanumeric CNPJ?

From July 2026, new CNPJs can have letters as well as digits in the first 12 characters. The last two characters are still digits, worked out with the same module 11 rule, counting each character as its ASCII code minus 48.