Skip to content
cnpj/ob
Free tool

Valid CNPJ generator

Brazilian CNPJ numbers with correct check digits to test forms, integrations and test data. Includes the new alphanumeric format.

Validate a CNPJ →

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.

PartExampleWhat it is
Root33.000.167Identifies the company
Order0001Head office or branch number
Check digits01Verify 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

Get a free key · Read the docs

Frequently asked questions

Does the generated CNPJ really exist?

Not necessarily. It has correct check digits and passes format validation. It may match a real company by chance; to find out, look the number up.

Can I use it to register a company?

No. Use it only for software testing and test data. Using a generated CNPJ to pose as a company is fraud.

What is the alphanumeric CNPJ?

A new format with letters in the first 12 positions, which the Receita Federal may issue since July 2026. The check digits use the same modulo 11, with each character worth its ASCII code minus 48 (A = 17, B = 18…).

Are the CNPJs generated on the server?

No. Everything runs in your browser; nothing is sent or stored.