Ontoom

CNPJ generator

Click "Generate CNPJ" and you’re done — a valid number for testing.

Important: Synthetic data for testing. Misuse is the user's responsibility.

Already have a CNPJ and want to check the digits? CNPJ validator.

Valid CNPJ generator

Generates CNPJ with correct check digits for fixtures and form tests. “Valid” here is mathematical — it does not mean a registered company.

CNPJ with and without mask

With punctuation the format is readable for UI and documents. Without punctuation it works better for APIs and databases. Toggle the option in the generator above as needed.

How to generate CNPJ for tests

  1. Choose whether you want punctuation.
  2. Click Generate CNPJ.
  3. Copy the value into the form or seed.
  4. If you need to check a typed number, use the validator.

Frequently asked questions

Is the generated CNPJ real?
No. It is synthetic and only passes mathematical check-digit validation.
Can I use it in real registrations?
No. Use it in tests, staging and demos. In production, validate the CNPJ provided by the user.
Does it support with and without punctuation?
Yes. With mask it is 00.000.000/0000-00; without mask, only the 14 digits.
Does it query the tax authority?
No. Everything runs in the browser, with no official registries.
How do I validate a CNPJ?
Use Ontoom’s CNPJ validator or compute the two check digits with mod 11, rejecting invalid sequences.

See also