CNPJ Generator
What is a CNPJ?
CNPJ stands for Cadastro Nacional da Pessoa Jurídica, which is the Brazilian national registry number for legal entities (similar to a business tax ID).
It’s a 14-digit number used to identify companies and organizations in Brazil.
FAQ
Are the generated CNPJ numbers real?
No, these are randomly generated numbers that follow the correct CNPJ format and validation rules, but they don’t correspond to real companies.
Can I use these for official purposes?
No, these are for testing and development purposes only. For official business registration, use the proper government channels.
How accurate is the validation algorithm?
The algorithm follows the official Brazilian CNPJ validation rules, ensuring mathematically correct check digits.
How it works
This tool generates valid CNPJ numbers instantly. It follows the official structure and checksum rules to make sure each generated number is correctly formatted. Both the raw number and the masked format (with punctuation) are shown for convenience.
Format
Each CNPJ number consists of:
- Root: 8 random digits (can include leading zeros)
- Branch: 4 random digits (e.g., 0001 is common but not required)
- DV1, DV2: Calculated check digits using mod 11 algorithm
Check Digit Algorithm (mod 11)
DV1 Calculation:
Weights: 5 4 3 2 9 8 7 6 5 4 3 2
sum = Σ(digit[i] * weight[i])
r = sum % 11
DV1 = (r < 2) ? 0 : 11 - r
DV2 Calculation:
Weights: 6 5 4 3 2 9 8 7 6 5 4 3 2
Repeat with base12 + DV1