Skip to content
Leandro Lima

CNPJ generator

Generate numeric CNPJs and the new alphanumeric format for testing.

Generators100% client-side

Options

In the alphanumeric format the first 12 positions may contain letters; the 2 check digits stay numeric and are computed from each character's ASCII value minus 48.

Result

Recent

Nothing here yet.

About this tool

Generates CNPJ numbers in both the classic all-numeric layout and the alphanumeric format the Receita Federal is rolling out for new registrations. In the new format, the first twelve positions may hold digits or uppercase letters, while the two check digits stay numeric.

The check digits are computed with the official rule for the new format: each character is converted to its ASCII code minus 48, then run through the same módulo 11 weighting used today. That means a generated alphanumeric CNPJ will pass a correctly updated validator — and will be rejected by a legacy one, which is exactly the case you want in your test suite.

How to use it

  1. 1Pick the format: numeric only, or the new alphanumeric standard.
  2. 2Choose how many to generate and whether to apply the punctuation mask.
  3. 3Copy the batch into your fixtures or validation tests.

Privacy

This tool runs entirely in your browser. Nothing you type or paste is sent to a server, and your local history is stored only on this device.

Related tools