CNPJ validator
Validate numeric and new alphanumeric CNPJs, with the maths shown.
CNPJ
—
Type a CNPJ to validate it.
Recent
Nothing here yet.
About this tool
Validates CNPJ in both layouts: the classic all-numeric one and the alphanumeric format adopted by the Receita Federal for new registrations, where the first twelve positions may contain uppercase letters as well as digits.
The check-digit rule is the one published for the new format: each of the twelve base characters is replaced by its ASCII code minus 48, the result is weighted 5-4-3-2-9-8-7-6-5-4-3-2 for the first digit and 6-5-4-3-2-9-8-7-6-5-4-3-2 for the second, and each digit is 11 minus the módulo 11 remainder — or zero when that remainder is 0 or 1. Existing numeric CNPJs stay valid under this rule, because digits map to themselves.
How to use it
- 1Paste the CNPJ — punctuation and lowercase letters are handled for you.
- 2Read the verdict and the detected format.
- 3Expand the breakdown to see the weighted sums behind each check digit.
Privacy
This tool runs entirely in your browser. Nothing you type or paste is sent to a server, and your local history is stored only on this device.
Related tools
- CPF validatorCheck a Brazilian CPF's check digits with a step-by-step breakdown.
- JSON formatter & validatorPretty-print, minify and validate JSON with precise error positions.
- XML formatter & validatorIndent, minify and well-formedness-check XML documents.
- JWT decoder & validatorDecode header and payload, inspect claims and check expiry.
