CNPJ Base/Branch Validator
Validate the base (8 digits) and branch (4 digits) of a Brazilian CNPJ, without the check digit. Useful for spotting headquarters, branches and corporate groups.
CNPJ root and branch without check digits
A list of establishments lands on your desk and you need to tell headquarters from branches, or group everything by corporate family. That lives in the first twelve digits of a Brazilian CNPJ: eight for the root, which identifies the company, and four for the establishment order, where 0001 is headquarters and 0002 onward are branches. This page checks whether that portion is written correctly, as you type.
The accepted pattern is exactly twelve digits, with dots and slash optional, so 12.345.678/0001 and 123456780001 both pass. Here is the part that trips almost everyone: the two check digits are not part of the pattern. Paste a full CNPJ such as 12.345.678/0001-95 and the answer is red. Drop the dash and the final two digits and the same number goes green.
This is not a CNPJ validator. No mod 11 calculation runs here, so 00.000.000/0000 shows green with no caveat at all. To confirm a number is mathematically valid, use a full CNPJ validator; to confirm the company exists, that is a lookup at the tax authority. The pattern also accepts digits only, so the alphanumeric CNPJ format, with letters in the root, is rejected. Everything runs in your browser.
Frequently asked questions
Why does my complete CNPJ read as invalid?
What does the 0001 in the middle mean?
Does it verify the check digit?
Related Tools
CPF/CNPJ Detector & Validator
Auto-detect if a string is CPF (11 digits) or CNPJ (14 digits) and validate its check digit.
NIP Poland Validator
Validate a Polish NIP number (10 digits) with the official checksum. It is the Polish business tax ID — useful for invoicing and trading with Polish companies.
Alphanumeric CNPJ Validator
Validate the new Brazilian alphanumeric CNPJ format (IN RFB 2.119/2022): 12 alphanumeric characters plus 2 mod-11 check digits.
CNPJ Validator
Validate Brazilian CNPJ numbers instantly using the official algorithm. Useful for testing fiscal document validation. No data sent to servers.
Batch CNPJ Validator
Validate a list of CNPJs (one per line) with a summary of valid, invalid and total. No data sent to servers.
CNAE Section Validator
Validate if a 7-digit CNAE code belongs to a section (A-U). Shows the corresponding CNAE 2.0 section.