CNPJ Validator
Validate CNPJ numbers in both the numeric and the new alphanumeric format by checking their structure and check digits.
- Format check only
- Checks structure and check digits. It does not confirm that the document, card or account really exists.
- Private by default
- Nothing you enter leaves your browser.
How it works
The first eight characters may be digits or letters, the branch and check digits must be numbers. Each character is converted to its ASCII code minus 48, and both check digits are recalculated with cycling weights from 2 to 9.
Alphanumeric CNPJs are issued from July 2026 under Receita Federal rules; the same check-digit algorithm applies to both formats.
Questions
Does a valid result mean the document exists?
No. The check only confirms that the number has the right shape and that its check digits are consistent. Only the issuing authority can confirm that a document was actually issued and belongs to someone.
Related tools
CNPJ Generator
Generate valid test CNPJ numbers in the classic numeric format or the new alphanumeric format, with or without the mask.
CPF Validator
Check whether a CPF number is well formed and its two check digits are correct. A format check only, run in your browser.
State Registration Validator
Validate a Brazilian state registration (inscrição estadual) with the check-digit rules of each of the 27 states, in your browser.