CPF and CNPJ Generator and Validator
Check Brazilian CPF and CNPJ numbers instantly, or create valid ones for testing software.
- Your data never leaves your device
- 100% free
- No sign-up
- Works offline after first load
How to validate a CPF or CNPJ
- Type or paste a CPF or CNPJ, or a whole list.
- The type is detected and the check digits verified instantly.
- Switch to Generate to create valid test numbers and download them.
About CPF and CNPJ Generator and Validator
Validate Brazilian CPF and CNPJ numbers with the official check-digit rules.
It works in your browser, so it is instant and private, and your details are remembered on this device.
Good for
- Validating customer records and forms
- Test data for software and QA
- Cleaning CPF and CNPJ lists in spreadsheets
Tip: Paste a column from Excel to validate hundreds of numbers at once, then download the CSV report.
Frequently asked questions
How is a CPF validated?
A CPF has 9 digits and 2 check digits. Each check digit is calculated from the digits before it with weights 10 to 2 (and 11 to 2) and the remainder of a division by 11. Numbers with all digits equal, like 111.111.111-11, are invalid.
What is the alphanumeric CNPJ?
From July 2026 the Receita Federal issues new CNPJs whose first 12 characters may contain letters, such as 12.ABC.345/01DE-35. The two check digits stay numeric. Existing numeric CNPJs do not change. This tool validates and generates both.
Are the generated numbers real?
They have correct check digits but are random and belong to nobody. Use them only to test software, forms and databases — never to identify yourself.
Does a valid check digit mean the CPF or CNPJ is active?
No. It only proves the number is well formed. Check the registration status (situação cadastral) on the Receita Federal website.
Can I check other Latin American numbers?
Yes. The same tool validates Chilean RUT, Argentine CUIT and CUIL, Mexican RFC and CURP, Colombian NIT, Peruvian RUC and the Ecuadorian cédula.
Can I check a whole spreadsheet?
Yes. Click Open CSV / Excel and choose a .csv, .xlsx, .xls or .ods file. The column that holds the numbers is detected automatically (you can pick another one), every row is validated, and you can download a CSV report or copy the valid numbers formatted or as digits only.
Can I generate test numbers for a specific state or branch?
Yes. For CPF choose the region digit (for example 8 for São Paulo), and for CNPJ type the branch number, such as 0001 for the head office. Generated numbers are unique and have valid check digits.
Is what I enter uploaded?
No. Numbers are checked and generated in your browser. Your recent checks are kept only in this browser (History).