CNPJ Generator and Validator
Generate valid CNPJs for headquarters or branches for testing
What is CNPJ?
CNPJ (Cadastro Nacional da Pessoa Jurídica) is a unique number that identifies a company before the Brazilian Federal Revenue Service. It consists of 14 numeric digits in the format xx.xxx.xxx/xxxx-xx, where the last two digits are check digits.
CNPJ Structure
The CNPJ is divided into parts:
- First 8 digits: Identify the base company
- Next 4 digits: Identify the headquarters (0001) or branch (0002, 0003, etc.)
- Last 2 digits: Check digits calculated by algorithm
Difference between Headquarters and Branch
A company's headquarters always ends with /0001 before the check digits. Branches receive sequential numbers like /0002, /0003, and so on. Our tool allows generating CNPJs for both headquarters and branches.
What are generated CNPJs used for?
Generated CNPJs are mathematically valid, but do not represent real companies. They are useful for:
- Business systems and ERP testing
- Form and registration validation
- B2B application development
- Training and demonstrations
- Staging environments
CNPJ Validation
The CNPJ validation algorithm uses calculations with specific weights for each digit position. The last two digits are calculated using modulo 11, ensuring the mathematical integrity of the number. Our tool validates whether the CNPJ is mathematically correct, but does not verify if it exists in the Federal Revenue Service.
Security and Privacy
All operations are performed locally in your browser. No data is sent to external servers. Generated CNPJs are random and do not belong to real companies. Remember: use only for legitimate testing purposes.
Frequently Asked Questions
CNPJ (National Registry of Legal Entities) is the identification number for Brazilian companies with the Federal Revenue.