Brazil CNPJ validator
How the CNPJ format works
- Format
- 14 digits
- Example
- 11222333000181
Things to watch for
- 14 digits, the last 2 are mod-11 check digits
- Checksum only — does not confirm the company is active or registered
- Repeated-digit strings are always rejected
^[0-9]{14}$A CNPJ (Cadastro Nacional da Pessoa Jurídica) is the 14-digit number Receita Federal assigns to every company and legal entity registered in Brazil — for example 11.222.333/0001-81. It appears on invoices, contracts, and tax filings, and it’s what distinguishes a registered business from an individual taxpayer, who instead holds an 11-digit CPF.
The 14 digits are structured, not arbitrary: the first 8 identify the company’s base registration, the next 4 identify which branch or order the registration covers (0001 is almost always the head office), and the final 2 are check digits generated by weighting every preceding digit and reducing the result modulo 11 — twice, once for each check digit. That layered structure is why a single mistyped digit in a CNPJ is far more likely to fail validation than to silently pass as a different, equally valid number.
How this validator works
This tool checks that the input is 14 digits and runs the two real mod-11 calculations Receita Federal uses to generate a CNPJ’s check digits, entirely in your browser. It also rejects repeated-digit strings, which are never valid. Nothing is sent to a server, and there’s no signup.
What a pass doesn’t tell you
A pass confirms the number is a mathematically valid CNPJ — not that the company is currently active, that its registration hasn’t been suspended or cancelled, or that the branch number corresponds to a location that still operates. Receita Federal is the only authoritative source for a company’s current registration status.
Scope: this page and tool cover CNPJ format and checksum validation only — not company registration status, branch verification, or CPF validation (a separate tool covers that).
Content last reviewed 2026-07-07.
CNPJ FAQ
What do the 14 digits of a CNPJ represent?
The first 8 digits identify the company itself (the 'base' registration), the next 4 identify the specific branch or order number (0001 for the head office, higher numbers for additional branches), and the final 2 are check digits — for example 11.222.333/0001-81.
Does a valid CNPJ checksum mean the company is currently active?
No. This tool only confirms the 14 digits pass the two mod-11 check-digit calculations used to generate a valid CNPJ. Companies can be suspended, dissolved, or have their registration cancelled by Receita Federal, and none of that is visible from the number alone.
What's the difference between a CNPJ and a CPF?
A CPF identifies an individual taxpayer; a CNPJ identifies a company or other legal entity. They use similar mod-11 checksum logic but have different digit counts (11 versus 14) and are never interchangeable.