SEFAZ Brasil icon

SEFAZ Brasil

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

Actions12

CPF/CNPJ → Format CPF

AI-generated

Summary

Format the given CPF number by applying the standard Brazilian CPF mask (###.###.###-##).

Inputs

  • CPF (required) — A string representing the CPF number, which may contain digits with or without formatting characters.

Output shape

a single object containing the formatted CPF string under the key 'cpf'.

If the input CPF does not have exactly 11 digits after removing non-numeric characters, the output will be the cleaned number (only digits) without applying the mask.

Examples

Example 1: Formatting a raw CPF number

Provide a CPF string without formatting, such as '12345678909'. The output will be '123.456.789-09'.

Links

Discussion