SEFAZ Brasil icon

SEFAZ Brasil

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

Actions12

CPF/CNPJ → Validate CPF

AI-generated

Summary

Validate a Brazilian CPF (Cadastro de Pessoas Físicas) number by checking its format, digit count, repeated digits, and verifying its two check digits for authenticity.

Inputs

  • CPF (required) — The CPF number to validate as a string, typically formatted like '123.456.789-09' but the validation logic removes dots, dashes, and spaces automatically.

Output shape

a single JSON object with validation details

The returned object includes: 'valid' (boolean) indicating if the CPF is valid; 'cpf' with the cleaned numeric string; 'tipo' set as 'CPF - Individual'; and 'message' providing validation status or specific failure reason. Validation fails if the CPF does not have exactly 11 digits, has all repeated digits, or the check digits are incorrect.

Examples

Example 1: Valid CPF input

Provide a CPF string like '123.456.789-09' in the 'CPF' input parameter and select the 'Validate CPF' operation under the 'CPF/CNPJ' resource in the SEFAZ Brasil node. The node will return validation result in the output.

Links

Discussion