Brazil / Documents

CPF and CNPJ Validator

Check whether a Brazilian CPF or CNPJ number is valid: format and check digits, with the punctuation added, including the new alphanumeric CNPJ. Paste one or many.

CPF and CNPJ Validator: A CPF has nine digits and two check digits, each a weighted sum modulo 11; numbers of one repeated digit fail. A CNPJ has twelve characters and two check digits with weights 5 to 2 and 9 to 2; since July 2026 new CNPJs can include letters, which count as their character code minus 48, so the same calculation covers both. The tool checks the check digits only and does not create numbers. Runs 100% locally in your browser with zero server file uploads.

Runs
In your browser
Cost
Free · no sign-up
Availability
Ready to use
CPF and CNPJ validatorLocal processing

Runs entirely in your browser

Only the format and check digits are verified, on this device. A valid number is not necessarily one that the Receita Federal has issued, or one that belongs to the person or company you expect.

How the check digits work

For the first CPF check digit, the nine digits are multiplied by 10 down to 2 and summed; the remainder of the sum × 10 divided by 11 is the digit, with 10 counting as 0. The second digit repeats this over ten digits with weights 11 down to 2. A single typing mistake almost always breaks one of them.

To receive payments to a CPF or CNPJ Pix key, make a code with the Pix QR code generator.

Formats

CPF: 000.000.000-00. CNPJ: 00.000.000/0000-00, where the four digits after the slash number the company's branches (0001 for the head office) and the last two are check digits.

How to use it

  1. Paste one or more CPF or CNPJ numbers, one per line; punctuation is optional.
  2. Each is checked for its length and check digits.
  3. Read the result, with the number formatted as 000.000.000-00 or 00.000.000/0000-00.

Privacy & limitations

Numbers are checked in your browser and never sent anywhere.

Related tools

Frequently asked questions

Does a valid CPF mean the person exists?

No: it means the check digits are right. Only the Receita Federal can confirm that a CPF or CNPJ is registered and its status.

What is the alphanumeric CNPJ?

From July 2026, the Receita Federal issues CNPJs with letters in the first twelve positions, as numeric ones run out; existing numeric CNPJs stay as they are. The last two characters are still check digits.

Can it generate CPF numbers?

No, on purpose: the tool only checks numbers you already have.

Free tool · runs in your browser · no account required