Skip to content
Leandro Lima

CNPJ validator

Validate numeric and new alphanumeric CNPJs, with the maths shown.

Document validators100% client-side

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

  1. 1Paste the CNPJ — punctuation and lowercase letters are handled for you.
  2. 2Read the verdict and the detected format.
  3. 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