What it is for
To test systems that ask for a CNPJ: sign-up forms, front-end and back-end validation, spreadsheet imports and ERP integrations. The numbers pass any format check but say nothing about real companies. Do not use them to register or pose as a company.
How a CNPJ is built
It has 14 characters: 8 for the root (identifies the company), 4 for the order (0001 is the head office; branches follow 0002, 0003…) and 2 check digits, calculated from the first 12.
| Part | Example | What it is |
|---|---|---|
| Root | 33.000.167 | Identifies the company |
| Order | 0001 | Head office or branch number |
| Check digits | 01 | Verify the previous 12 |
Alphanumeric CNPJ
Since July 2026 the Receita Federal may issue CNPJs with letters in the first 12 positions (for example 12.ABC.345/01DE-35). The check digits remain numeric. Existing CNPJs do not change. If your system stores the CNPJ in a numeric field or only accepts digits, it will reject the new ones: generate a few alphanumeric ones here and test first. See the alphanumeric CNPJ guide (Portuguese), with validation code in JavaScript and Python.
Need to validate inside your system?
The cnpj/ob API validates the format without using quota and, with a free key, returns the company data straight from the Receita Federal:
curl https://api.cnpjob.com.br/cnpj/validate/33000167000101