validate_cnpj
Validates a Brazilian CNPJ (Cadastro Nacional da Pessoa Jurídica) using the official Receita Federal checksum algorithm. Use this tool when processing Brazilian company registrations, B2B invoices, supplier onboarding, e-commerce orders, or any document requiring a valid Brazilian company taxpayer number. Input must be a 14-digit string (with or without formatting). Returns whether the CNPJ is mathematically valid, along with the cleaned CNPJ. Does not verify if the CNPJ is active in the Receita Federal database.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cnpj | Yes | The Brazilian CNPJ to validate. Formatting (dots, slash and dash) is automatically removed. Example: '11.222.333/0001-81' or '11222333000181' |