Actions12
- CPF/CNPJ Actions
- Indicators Actions
- Issue NFe Actions
CPF/CNPJ → Validate CNPJ
AI-generatedSummary
Validate the checksum and format of a Brazilian CNPJ number to verify its authenticity.
Inputs
- CNPJ (required) — A string representing the CNPJ number to validate, which may include common separators like dots, slashes, and dashes.
Output shape
a single JSON object per execution containing validation details
The output object includes properties: valid (boolean), cnpj (cleaned digit string), tipo (string indicating it is a CNPJ and company branch type), and message (validation status or error description). Validation fails if the CNPJ does not have 14 digits, consists of repeated digits, or has invalid check digits.
Examples
Example 1: Successful validation
Input CNPJ '11.222.333/0001-81' to validate the company identifier and receive confirmation of its validity, including the company branch type (Headquarters or Branch number).
Example 2: Failed validation
Input a malformed or incorrect CNPJ such as with wrong check digits, and receive a descriptive failure message indicating the reason (e.g., 'Invalid first check digit').