Free CNPJ generator for testing (Brazil)
Generate valid random CNPJ numbers with correct check digits, for testing forms and validation logic.
- Runs in your browser
- Nothing uploaded
- Works offline
- No sign-up
About this tool
This tool creates syntactically valid Brazilian CNPJ numbers. Both check digits are calculated with the official modulo-11 weighting, so the numbers pass standard CNPJ validation. They are random and match no real company: use them only to test registration forms, masks and validation code. You can keep the branch as 0001 (headquarters) or randomise it. Everything runs locally in your browser.
How to use it
- Choose how many CNPJs you need.
- Decide whether the branch should stay 0001 or be random.
- Click Generate, then Copy the results into your test data.
Frequently asked questions
Are these real CNPJ numbers?
No. They are random numbers that merely satisfy the CNPJ check-digit rules so they pass validation. They are not registered to any real business and must not be used for fraud.
What does the branch 0001 mean?
Digits 9 to 12 of a CNPJ are the branch number; 0001 is the head office. Additional branches use 0002, 0003 and so on.
Do the check digits follow the official rule?
Yes. Both verifier digits use the standard modulo-11 weights, the same method Receita Federal uses.
