CNPJ Generator (Numeric & Alphanumeric)
Private by design — runs entirely in your browser
CNPJ (Cadastro Nacional da Pessoa Jurídica) is the Brazilian taxpayer ID for companies — historically a 14-digit number, but from July 2026 the Receita Federal also issues alphanumeric CNPJs that allow letters in the first twelve positions. Toova generates both variants in your browser with valid check digits — ready for fixtures, form validation, and demo data.
Why CNPJ became alphanumeric in 2026
The pool of purely numeric CNPJs is finite — eight base digits give 100 million company roots, and despite the four-digit branch suffix the issuing authority is running out of space within the next decade. The Receita Federal solved this by extending the alphabet to A–Z for the first twelve positions while keeping the two check digits numeric. Existing companies keep their numeric CNPJs forever; the alphanumeric format applies to new registrations from July 2026 onward. Tools, form validators, and databases need to handle both.
Numeric vs alphanumeric, side by side
A numeric CNPJ looks like 12.345.678/0001-95 — fourteen digits with the standard mask. An alphanumeric one looks like 12.ABC.345/01DE-35 — the first twelve positions can be any combination of digits and uppercase letters, the last two are still digits, and the same XX.XXX.XXX/XXXX-DD mask works. Both share the same check-digit algorithm, just applied to character values instead of plain digits. Toova lets you pick which variant you want from the toggle at the top of the page.
How the alphanumeric check digit is computed
The Receita Federal's official rule maps each character to a numeric value by subtracting 48 from its ASCII code point. The digit 0 maps to 0, 9 maps to 9, A maps to 17, Z maps to 42. Each mapped value is multiplied by the standard weight vector (5,4,3,2,9,8,7,6,5,4,3,2 for the first check digit; 6,5,4,3,2,9,8,7,6,5,4,3,2 for the second), summed, and reduced modulo 11. The same modulo-11 rule that has applied to numeric CNPJs since the 1970s now extends seamlessly to letters.
Bulk generation and formatting
Toggle batch mode to generate up to twenty CNPJs at once. Each is independently random, formatted with or without the standard mask, and copyable individually or in a single block. The variant choice — numeric or alphanumeric — applies to the whole batch. Use this for seeding fake company directories, exercising form validators that need to handle both old and new formats, and screen-recording demos.
Frequently Asked Questions
- When does the alphanumeric CNPJ start being issued?
- From July 2026. Existing numeric CNPJs are not affected — they remain valid forever. Only new CNPJ registrations issued from that date onward may include letters.
- Will my company's existing numeric CNPJ change?
- No. The Receita Federal has been explicit that the alphanumeric format applies only to new issuances. Every numeric CNPJ ever issued stays exactly as it is.
- Do alphanumeric CNPJs use uppercase only?
- Yes. The alphabet is digits 0–9 plus uppercase A–Z. Lowercase letters are not part of the format.
- Does the check digit math work the same for both variants?
- Almost. The weighted-sum modulo-11 rule is identical, but for letters each character's numeric value is its ASCII code point minus 48 (so A=17, Z=42). The two check digits themselves are always plain decimal digits in both variants.
- Are the generated CNPJs registered in the tax office?
- No. They satisfy the algorithm but are not assigned to any company by the Receita Federal. They won't appear in any official lookup — perfect for tests, useless for fraud.
- Can I use a generated CNPJ in production?
- Only for tests, fixtures, and demo screens. Using a generated CNPJ to issue invoices, open accounts, or evade taxes is fraud and a crime under Brazilian law.
- Do existing CNPJ validators accept alphanumeric CNPJs?
- Many do not yet — most validation libraries assume purely numeric input. Tools and validators must be updated before July 2026 to accept the alphanumeric variant. That's part of why we built this generator: developers need real test data while they upgrade their systems.