Kastavo

Brazilian CNPJ Validator

Enter a CNPJ, formatted or not, and see whether its check digits are valid.

This tool validates Brazilian documents only.

How it works

Validate Brazilian CNPJ numbers using the official verification digit algorithm. The CNPJ (Brazil's national registry of legal entities) has 14 digits: the first 12 identify the company and branch, and the last 2 are check digits computed from the previous ones using a modulo-11 algorithm. This validator automatically strips dots, slashes, and dashes, recomputes both check digits from the first 12 numbers, and compares them against the ones provided — with no server lookup: everything happens in your browser. Important: a CNPJ being mathematically valid doesn't mean it was actually issued to a company; this tool only validates the format and check digits, covering the classic 14-digit numeric CNPJ.

Frequently asked questions

Related tools