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
- 1Choose the quantity (1 to 100).
- 2Choose Headquarters or Random branch, the numeric or alphanumeric format and whether you want the mask.
- 3Copy the list with Copy all or one number at a time; Generate again draws new ones.
CNPJ structure
The CNPJ has 14 characters in three blocks. Since July 2026 the first 12 also accept letters; the example is the alphanumeric CNPJ 12.ABC.345/01DE-35.
| Position | Example | Meaning |
|---|---|---|
| 1–8 | 12.ABC.345 | Company root (base CNPJ) |
| 9–12 | 01DE | Branch number (0001 = headquarters) |
| 13–14 | 35 | Check digits |