About the CNPJ Generator
Generate valid CNPJs for software testing, with or without masking and choosing between headquarters (0001) or random branch. The numbers follow the official check-digit algorithm, so they pass any format validation — but they don't correspond to real companies. Use only for development purposes.
How to generate CNPJs in 3 steps
- Choose the quantity (1 to 100).
- Configure the options: 00.000.000/0000-00 mask and branch fixed at 0001 or random.
- Click Generate and use the copy buttons.
CNPJ structure
The CNPJ has 14 digits split into three blocks. The table below shows what each part represents.
| Position | Digits | Meaning |
|---|---|---|
| 1 a 8 | NNNNNNNN | Company root (base CNPJ) |
| 9 a 12 | NNNN | Branch number (0001 = headquarters) |
| 13 e 14 | DD | Check digits |