CNPJ Generator
Generate random valid Brazilian CNPJ numbers for testing, in the traditional numeric format or the new alphanumeric CNPJ. Choose whether you want formatting, then click generate and copy the result.
Want to validate instead?What is a CNPJ?
The CNPJ (Cadastro Nacional da Pessoa Jurídica) is the Brazilian company taxpayer ID, a unique number assigned to every business and legal entity in Brazil. It is issued by the Receita Federal (Brazil's federal tax authority) and is required to operate legally, make financial transactions, issue invoices (notas fiscais) and pay taxes. Any system that handles Brazilian companies needs a CNPJ field, and that field needs valid test data.
How does a CNPJ number work?
A CNPJ has 14 digits. The first eight identify the company, the next four identify the branch (0001 is the head office) and the last two are check digits, calculated with a modulo 11 algorithm.
What is the alphanumeric CNPJ?
Since July 2026, the Receita Federal has been issuing CNPJs that mix letters and numbers in the first 12 positions, such as 12.ABC.345/01DE-35. The two check digits remain numeric, and existing CNPJs do not change. Learn more on the alphanumeric CNPJ page.
How does a company get a CNPJ?
To get a CNPJ, a company must register with the Receita Federal. Registration can be done online or in person at a Receita Federal office. Online registration is done through the Receita Federal website and its virtual taxpayer service center (e-CAC).
When was the CNPJ created?
The CNPJ was created in 1998 by Normative Instruction SRF No. 27. It replaced the former Cadastro Geral de Contribuintes (CGC), which had been used since 1968 to identify Brazilian companies.
NOTE: This CNPJ generator is intended exclusively for educational purposes and for testing websites, software and similar systems. The numbers are randomly generated following the CNPJ formation rules. We are not responsible for any misuse.
Frequently asked questions
Does a generated CNPJ belong to a real company?
No. The numbers are random and only pass the check digit calculation. They are meant for testing systems, not for identifying companies.
How is a CNPJ number formed?
A CNPJ has 14 digits: the first 8 identify the company, the next 4 identify the head office or branch (0001 is the head office) and the last 2 are check digits.
Can the generator create alphanumeric CNPJs?
Yes. Choose the Alphanumeric type to generate CNPJs with letters and numbers in the first 12 positions, the format adopted by Brazil's Receita Federal in July 2026.
Can I generate several CNPJs at once?
Yes. Set the quantity and the separator and all the numbers appear ready to copy.