br__validate_cnpj
Check if a Brazilian CNPJ is valid, supporting both legacy 14-digit and new alphanumeric formats. Accepts digits or formatted input to ensure tax ID compliance.
Instructions
Validate a Brazilian CNPJ (company tax ID).
Accepts both the legacy all-numeric form (14 digits) and the alphanumeric form introduced by NT 2026.004 / PL_010d (12 alphanumeric characters + 2 numeric check digits, production from 2026-07-01).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cnpj | Yes | CNPJ string, with or without ``.``/``/``/``-`` separators. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| valid | Yes | ||
| value | No | ||
| country_code | No |