Fictitious data, for testing only. The numbers follow the format and check digits, but they do not belong to real people or companies. Do not use them for sign-ups, purchases, or anything outside development and QA.

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.

History

Latest generated values in this browser, grouped by date.

Nothing yet. Click generate to start.

Used

Values copied in this browser, by date.

Nothing used yet. Copy a result to record it.

What this tool does

The generator builds a 14-digit numeric CNPJ with the two module-11 check digits. Use it to fill a form, a fixture, or a mask test. It does not call the Brazilian tax authority, it does not register a company, and it does not say whether the number is active.

The first eight digits are drawn in the browser. The next four are always 0001, the establishment order this page fixes on purpose instead of drawing a branch. With punctuation the shape is 00.000.000/0001-00. Without it you get the 14 digits only. To check a number you typed, use the CNPJ validator.

How to use it

  1. Turn punctuation on or off. The mask is easier to read; the digits-only form fits an API or a database better.
  2. Click Generate CNPJ. The math runs in the browser and the result can be copied at once.
  3. Under More options, pick 1, 10, 50, or 100. A batch does not repeat a number. Export TXT (one per line), CSV (a cnpj column), or JSON (a list).
  4. History on this page stays in this browser. Clearing site data deletes it. Using the generator does not send the numbers to an Ontoom server.

How the digits are calculated

The first check digit uses the first 12 digits and the weights 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, and 2. Multiply, sum, take the remainder modulo 11, and if the remainder is less than 2 the digit is 0; otherwise it is 11 minus the remainder. The second check digit repeats the sum on those 12 digits plus the first check digit, with weights 6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, and 2.

A run of 14 identical digits is rejected before that sum. Letters are not part of the input: the page strips everything that is not a digit. An alphanumeric CNPJ pasted here loses its letters and is not validated as one. This tool only handles the 14-digit numeric CNPJ.

Example

11.222.333/0001-81 passes this rule. The base is 112223330001. The calculated first check digit is 8 and the second is 1, which are the last two digits. The establishment order is 0001, the same value the generator writes on every new number.

Change only the last digit to 11.222.333/0001-82. The second check digit no longer matches: expected stays 1, received becomes 2. The CNPJ validator shows that gap. 00.000.000/0000-00 is rejected as a repeated sequence, even though it has 14 digits.

valid:    11.222.333/0001-81
invalid:  11.222.333/0001-82  (2nd check digit expected 1, received 2)
rejected: 00.000.000/0000-00        (all digits equal)

Frequently asked questions

Is the generated CNPJ a real company?
No. It only satisfies the length, the 0001 order, and the two check digits. A real registration requires an authorized lookup, which this page does not do.
Why does every number use 0001 before the check digits?
Because the generator fixes the establishment order at 0001. The first eight digits change on each click. There is no 0002 branch option on this page.
Can I use the number to issue an invoice or open an account?
No. The use is testing, staging, and study. Treating a synthetic number as a real registration can be fraud.
Can a batch of 100 repeat a CNPJ?
Not inside the same click. The page keeps the numbers already drawn for that batch and continues until the count is filled, at most 100.
Does punctuation change validity?
No. 11.222.333/0001-81 and 11222333000181 are the same number for the sum. The mask only changes how you copy it.

Written by Orlando Alves · reviewed on · Editorial policy

See also