This tool generates structurally valid CNPJs — Brazil's company tax ID — for testing and development. Each number passes the official módulo 11 check, in the classic all-numeric form, the new alphanumeric form arriving in July 2026, or a mix of both, with or without the XX.XXX.XXX/XXXX-XX mask. Generate one or up to fifty at a time, copy them individually or as a list, and drop them straight into fixtures, seed data, or a form you are trying to break. They are valid by construction — and, just as importantly, they do not belong to any real company.
Valid by construction, not registered
A CNPJ has fourteen positions: a twelve-position base — an eight-position root plus a four-position branch identifier — followed by two numeric check digits. This generator draws the twelve base positions at random from the allowed alphabet and then computes the two check digits with the same módulo 11 routine Receita Federal uses, so every result is internally consistent and will pass any correct validator. What it cannot do is make the number real: structural validity says the arithmetic is right, not that Receita ever issued that number to a business. Treat every generated CNPJ as disposable test data, never as a stand-in for a genuine company. If you want to see the check-digit arithmetic worked out position by position, the check-digit calculator lays out every term; to confirm a number you already have, use the validator.
Why generate test CNPJs at all
Realistic identifiers are the awkward middle of test data. A hard-coded 11.111.111/1111-11 is rejected the moment any validation runs — Receita excludes repeated-digit numbers — yet inventing a number by hand almost never satisfies the check digit. So developers either disable validation in tests (and stop testing the thing they care about) or copy a real company's CNPJ off the internet (and quietly smuggle someone's actual identifier into a fixture). A generator that emits valid, obviously-fake numbers removes both temptations: signup flows, invoice forms, ERP imports, and contract templates can all be exercised with data that behaves like the real thing and carries no privacy baggage.
Three formats, for the 2026 coexistence
From July 2026 newly issued CNPJs can contain letters in the first twelve positions, while every existing numeric CNPJ stays valid forever. For a while your systems will see both. The format toggle exists for exactly that transition. Numeric produces the classic all-digit form, useful for regression-testing that nothing about the old format changed. Alphanumeric always includes at least one letter, so you are genuinely exercising the new code path rather than a number that happens to look numeric. Mixed emits a batch where each entry is independently numeric or alphanumeric — the closest thing to what a production database will actually hold during the coexistence period, and the best stress test for validation that must accept both.
The ambiguous-letter toggle
By default the generator avoids the visually ambiguous letters I O U Q F. This follows ENCAT's Nota Técnica Conjunta 2025.001, which recommended Receita not issue those letters to reduce transcription errors — a recommendation still pending confirmation, not a validation rule. Keeping the toggle on produces test data that matches the most likely real-world issuance, which is the safer default when you are testing a system that may adopt the same restriction. Turn it off and the generator draws from the full A-Z range, which is also perfectly valid: remember that a validator must accept those letters even though a generator does well to avoid them.
Using generated data responsibly
The point of fake data is to stay fake. Generated CNPJs are ideal for automated tests, demos, documentation, and seed databases; they are not a way to register a company, pass KYC, or stand in for due diligence, and presenting one as a real business identifier can amount to fraud. Under the LGPD a CNPJ is a low-sensitivity business identifier rather than personal data, but the same discipline that keeps real CPFs out of your fixtures applies here: generate fresh fake numbers rather than recycle real ones. A new batch costs nothing and leaves no trace, so there is never a reason to hold on to a real identifier for convenience. Everything runs entirely in your browser — nothing is sent to a server, and the tool stores only your generation settings locally, never the numbers themselves. For the full picture of the rollout and what it means for your stack, see our guide on what changes with the alphanumeric CNPJ.

