CNPJ Validator
Check if a CNPJ is mathematically valid by verifying its check digits.
Invalid CNPJ
The check digits don't match. Please verify the number.
API Endpoint
GET /api/tools/validate/cnpj/{cnpj}
Response includes: isValid, formatted, unformatted
How CNPJ Validation Works
The CNPJ (Cadastro Nacional da Pessoa Juridica) is the Brazilian tax identification number for companies. It consists of 14 digits, where the last two are verification digits calculated using a specific algorithm.
CNPJ Structure
- First 8 digits: Company base number
- Next 4 digits: Branch number (0001 = headquarters)
- Last 2 digits: Check digits (calculated from the first 12)
Check Digit Algorithm
The check digits are calculated using weighted multiplication and modular arithmetic (mod 11). Our validator performs this calculation and compares the result with the provided digits.
Important Note
A mathematically valid CNPJ doesn't guarantee the company exists or is active. To verify if a company is registered with Receita Federal, search our database or use our full verification tool.