The CPF & CNPJ Validator instantly checks whether a Brazilian CPF (individual taxpayer) or CNPJ (company) number is mathematically valid. Both documents end in verification digits calculated from the preceding digits with a modulo-11 algorithm. This tool detects automatically whether you typed a CPF (11 digits) or a CNPJ (14 digits), recomputes the check digits, rejects well-known invalid sequences such as repeated digits, and tells you immediately whether the number is valid — formatting it for you. It is ideal for developers validating form input and for anyone double-checking a document, and it runs entirely in your browser so your data stays private.
How to Use the Validator
- Paste or type a CPF or CNPJ — with or without dots, slashes and dashes.
- The tool detects the type and validates the check digits as you type.
- Read the result: a green badge for valid numbers (with the formatted version) or a red badge for invalid ones.
Benefits and Use Cases
- Validate form input on the spot without using real personal data or a backend.
- Understand how the modulo-11 check digits work, useful for building your own validation.
- Runs 100% in your browser — the number you check is never uploaded anywhere.