SEFAZ Brasil icon

SEFAZ Brasil

Brazil Electronic Invoice - CPF/CNPJ validation, Dollar, SELIC, IPCA

Actions12

CPF/CNPJ → Format CNPJ

AI-generated

Summary

Format a Brazilian CNPJ number by applying the standard mask, inserting dots, slashes, and dashes to output a formatted CNPJ string.

Inputs

  • CNPJ (required) — The unformatted CNPJ string to be masked (should contain 14 digits). Example: '11.222.333/0001-81'.

Output shape

a single record containing the formatted CNPJ string under the 'cnpj' property

If the input string does not contain exactly 14 digits after cleaning, the output will be the cleaned numeric string without formatting.

Examples

Example 1: Input CNPJ '11222333000181'

Set the 'CNPJ' parameter to '11222333000181'. Select resource 'CPF/CNPJ' and operation 'Format CNPJ'. The output is the formatted string '11.222.333/0001-81' under 'cnpj'.

Links

Discussion