InputTestHub

CNPJ Validator

Checks a Brazilian CNPJ against both check digits and shows whether the number belongs to a head office or a branch.

Security Nothing uploaded No sign-up Free, unlimited
Security tool
Enter something above.
In short A CNPJ is the company equivalent of a CPF: fourteen digits, two mod-11 check digits, and weights that run 5,4,3,2 then cycle 9 down to 2 for the first digit and one position longer for the second. The part people miss is that four of the fourteen digits are a branch number — positions 9 to 12 — and 0001 means the head office. So two CNPJs that differ only in those four digits are the same company at different addresses, which matters when deduplicating a supplier list. As with the CPF, a passing checksum proves the number was typed correctly and nothing more; only the Receita Federal can confirm the company exists.

How to use the CNPJ Validator

  1. Paste the number — punctuation and spaces are ignored.
  2. Read the verdict and, where the number encodes anything, what it decodes to.
  3. Treat a pass as "typed correctly", not as "confirmed by the authority".

About the CNPJ Validator

A CNPJ is the company equivalent of a CPF: fourteen digits, two mod-11 check digits, and weights that run 5,4,3,2 then cycle 9 down to 2 for the first digit and one position longer for the second. The part people miss is that four of the fourteen digits are a branch number — positions 9 to 12 — and 0001 means the head office. So two CNPJs that differ only in those four digits are the same company at different addresses, which matters when deduplicating a supplier list. As with the CPF, a passing checksum proves the number was typed correctly and nothing more; only the Receita Federal can confirm the company exists.

What people use it for

  • Catching a mistyped number in a form before it reaches a database.
  • Cleaning an imported list and finding the rows that cannot be right.
  • Understanding what the number encodes and what it does not.

Details

Check digitsTwo, mod 11, with cycling weights
Branch numberPositions 9 to 12 — 0001 is the head office
Typo detection99.9% of single-digit errors, measured over 3,000 cases
RepdigitsFourteen identical digits are rejected by rule
PrivacyRuns entirely in your browser
The branch number is why a CNPJ list often looks duplicated when it is not — the same eight-digit root with different branches is normal and expected. Nothing you paste is transmitted — the check runs entirely in your browser.

Where this tool stops

Internal consistency only. It cannot confirm registration, status or ownership.

Frequently asked questions

What is the 0001 in the middle of a CNPJ?
The branch number. 0001 is the head office and later numbers are branches, so 11.222.333/0001-81 and 11.222.333/0002-62 are the same company at two locations. The check digits differ because they are computed over the whole number including the branch.
Can I tell what a company does from its CNPJ?
No. Unlike some national schemes the CNPJ encodes no activity, size or location beyond the branch counter — the first eight digits are simply a registration sequence.
Does this prove the company is active?
No. It proves the fourteen digits are consistent. A company can be dissolved and its CNPJ still passes the checksum forever, because the arithmetic has nothing to do with the registration status.
Is anything I paste sent anywhere?
No. The arithmetic runs in this browser tab and no request is made — open your Network tab and watch while you type. That matters more for an identity number than for almost anything else on this site, which is why there is no server side to this tool at all.
Does this replace an official check?
No, and it cannot. Every scheme here proves at most that the digits are internally consistent. Only the issuing authority can confirm a number exists, is active, and belongs to a particular person.
Is the CNPJ Validator free?
It is free, with no account, no trial and no daily cap. Every security tool on inputtesthub.com works the same way: open the page and use it.
Is my data uploaded anywhere?
No. The CNPJ Validator runs entirely in your browser using JavaScript. Because the work happens locally, the utility also keeps working if your connection drops, and closing the tab is all it takes to discard everything.
What problem does the CNPJ Validator solve?
The most common reasons people reach for it: catching a mistyped number in a form before it reaches a database. Cleaning an imported list and finding the rows that cannot be right. Understanding what the number encodes and what it does not. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
What are the limits of the CNPJ Validator?
Internal consistency only. It cannot confirm registration, status or ownership. Knowing where a tool stops being trustworthy matters more than the cases where it works.
What are the reference figures here?
Check digits is Two, mod 11, with cycling weights. Branch number is Positions 9 to 12 — 0001 is the head office. Typo detection is 99.9% of single-digit errors, measured over 3,000 cases. These are printed on the page itself, so you do not have to take them on trust.
Can I use the CNPJ Validator on mobile?
Yes. The page is responsive and the utility works in Chrome, Safari, Firefox, Edge and Samsung Internet on both Android and iOS. There is no app to install and nothing to sign into.

Related security tools

All 100
01

Password Strength Checker

Estimates password entropy and crack time, and identifies the specific weaknesses in what you…

02

Hash Generator

Generates MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text, all at once.

03

MD5 Hash Generator

Generates an MD5 hash of any text or string, with optional HMAC and uppercase output.

05

SHA-1 Hash Generator

Generates SHA-1 hashes, still required by some legacy systems and Git object addressing.

06

SHA-512 Hash Generator

Generates SHA-512 hashes for checksums, signatures and archival fingerprints. Runs in your…

09

AES Text Encryption

Encrypts and decrypts text with AES-GCM 256-bit using a password, entirely in your browser.

10

XOR Cipher Tool

Applies a repeating-key XOR to text or hex, the operation behind many simple obfuscation…