Valid check digits
The generated CNPJ passes the modulo 11 math used in Brazil.
In development, forms and test databases often require a CNPJ with valid check digits. The generator builds 12 random characters and computes the last two digits with the same modulo 11 used by the Brazilian Federal Revenue, including the alphanumeric format from IN RFB 2.229/2024. The numbers do not belong to real companies.
The generated CNPJ passes the modulo 11 math used in Brazil.
Use 00.000.000/0000-00 or the 14 characters, matching your system field.
Also generates the letter-and-digit pattern in the first 12 positions, as defined by the Revenue Service.
Nothing is sent to servers. Randomness uses crypto.getRandomValues().