1001Ferramentas
🏢Validators

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?
The page tests root and branch only, twelve digits. The two trailing check digits fall outside the pattern and fail the match, so strip them before pasting.
What does the 0001 in the middle mean?
It is the establishment order. 0001 marks headquarters, while 0002, 0003 and so on are branches sharing the same eight-digit root.
Does it verify the check digit?
No, this is a format check only. Meaningless numbers such as 00.000.000/0000 pass, because the digits sit in the expected positions.

Related Tools