How to generate and validate a CNPJ
Choose alphanumeric or numeric format, punctuation, and a batch size from 1 to 50. Copy or export the batch as JSON and CSV. The validator normalizes letters and recalculates both check digits locally without querying the Brazilian Federal Revenue.
Alphanumeric and numeric CNPJ
A CNPJ still contains 14 positions: a 12-character base followed by two numeric check digits. New registrations may contain letters and numbers, while existing numeric CNPJs remain valid.
Use numeric mode for legacy integrations and alphanumeric mode when testing systems prepared for the current format.
Safe use in development
The generated values are intended for forms, APIs, ERP integrations, imports, databases, and automated tests. Correct check digits do not prove that a company exists or is in good standing.
Do not use these numbers to issue documents, open real accounts, or impersonate an organization.
Official check-digit example
The final two digits use two modulo-11 steps. For alphanumeric values, each base character uses its ASCII value minus 48. Official example base 12ABC34501DE produces 35, resulting in 12.ABC.345/01DE-35.
Official references and related tools
See the Brazilian Federal Revenue pages for the alphanumeric CNPJ project and its check-digit manual. For personal test identifiers, use the CPF Generator and Validator.
Frequently asked questions
Does a generated CNPJ belong to a real company?
Not necessarily. The generator creates a fictional structurally valid registration but does not query or confirm companies with the Brazilian Federal Revenue.
Does the generator support alphanumeric CNPJ?
Yes. You can generate the current alphanumeric format or the legacy numeric-only format.
Are existing numeric CNPJs still valid?
Yes. Adoption of the alphanumeric format does not change existing numeric registrations.
Can I generate a CNPJ without punctuation?
Yes. Disable punctuation to receive all 14 characters without separators.
Does the validator query the Brazilian Federal Revenue?
No. It checks format and check digits locally; that does not confirm registration or tax status.
Are generated CNPJs stored?
Only the latest 10 are kept in your browser local storage. No result is sent to CosmoTools.