本文へスキップ

CNPJ generator, numeric and alphanumeric

Generate numeric or alphanumeric CNPJ numbers, the format the Receita Federal began issuing in July 2026, for testing, or validate CNPJs in your browser.

Document

CNPJCadastro Nacional da Pessoa Jurídica

Company registration number · written like 12.ABC.345/01DE-35

Where the rules come from

Options

Up to 10,000 at a time

Valid format only · belongs to no one · for testing

Pick the options and press Generate. The numbers pass every rule this page checks, so they suit forms, fixtures and QA.

The roots are random, so by chance one can equal a CNPJ already registered: use them only in test systems. The Receita Federal's CNPJ simulator also hands out fictitious alphanumeric numbers for testing.
ブラウザで動作・アップロード不要しくみ

CNPJ generatorの使い方

  1. 1

    Choose the format

    Pick numeric for CNPJs as issued before July 2026, or alphanumeric to test the new format with letters in the root.

  2. 2

    Head office or branch

    Keep 0001 for head offices, or ask for random establishment numbers to test branches.

  3. 3

    Generate and export

    Set the count, press Generate and copy the list, or save it as TXT, CSV or JSON with root, establishment and format per row.

  4. 4

    Validate existing data

    Paste CNPJs from your database on the Check tab to find the ones whose check digits don't match.

制限と Pro

Free: up to 10,000 CNPJs per batch, numeric or alphanumeric, head office or random branch, and up to 10,000 lines per check.

Pro only removes the ads here. Pro を見る

CNPJ generator について

From July 2026 the Receita Federal assigns new CNPJs whose first twelve characters may contain letters, so every system that stores or validates a CNPJ has to accept something like 12.ABC.345/01DE-35. Developers updating an ERP, an invoicing module or a supplier import need test numbers in both shapes, and this generator makes them: numeric CNPJs as they have always been, or alphanumeric ones with at least one letter in the company root.

A CNPJ has fourteen characters. The first eight identify the company, the next four the establishment (0001 is usually the head office, higher numbers the branches) and the last two are check digits. The Receita's manual computes them by turning each character into its ASCII code minus 48, so digits keep their value and A to Z become 17 to 42, then weighting from the right with 2 to 9, restarting after the eighth character, and taking 11 minus the remainder mod 11, or 0 when the remainder is 0 or 1. The check digits stay numeric in both formats.

The Check tab applies exactly that rule to pasted CNPJs, with or without dots, slash and hyphen, and tells you which pair of digits it expected. Numeric CNPJs already issued keep their numbers and check digits.

The page cannot confirm that a company exists or read its situação cadastral; that needs the Receita's public consultation, and nothing here contacts it.

プライバシー

Generated and pasted CNPJs are handled entirely inside this page: no request carries them to the Receita Federal or any other service, and nothing you enter is stored.

CNPJ generator:よくある質問

What changes with the alphanumeric CNPJ?
New registrations from July 2026 can receive CNPJs whose first twelve characters mix capital letters and digits, while the last two remain numeric check digits. Fields that only accept digits, numeric database columns and masks such as 99.999.999/9999-99 need updating. The length, the punctuation and the split into root, establishment and check digits stay the same.
How are the check digits worked out when there are letters?
Each character becomes its ASCII code minus 48: digits are unchanged and A is 17. For 12ABC34501DE, the weights 5 4 3 2 9 8 7 6 5 4 3 2 give 459, remainder 8, so the first digit is 3. Adding it and using weights 6 to 2 gives 424, remainder 6, second digit 5: 12.ABC.345/01DE-35, the Receita's own example.
Do numeric CNPJs that already exist change?
No. Companies keep the CNPJ they have, with the same check digits; the alphanumeric format applies to new numbers. Because a numeric CNPJ is simply one with no letters, the same calculation validates both kinds, which is why this page needs no separate mode to check old and new numbers side by side.
What do the four digits after the slash mean?
They number the establishment within the company. 0001 is normally the head office (matriz) and 0002, 0003 and so on are branches (filiais). The first eight characters, the root, stay the same for all of them, so two CNPJs with the same root belong to the same company.
Will a generated CNPJ pass my system's validation?
It will pass any check that applies the Receita's check-digit rule, including systems that already accept letters. It will not pass a lookup against the Receita's register, because the number was made up for testing. For sandbox environments the Receita also offers a simulator that hands out fictitious alphanumeric CNPJs.

このツールでできるほかのこと