- CLEAN DATA
- BATCHED
- VALIDATED
- HUMAN
Short answer
How can I format CPF and CNPJ numbers using AI?
Your AI uses the format_batch tool to apply standard Brazilian masks to raw digit strings. You'll get a clean list of formatted CPF and CNPJ numbers. This breakdown shows how it works.
The results you get.
Clean, readable data.
The AI processes your raw data and delivers these specific outcomes.
CLEAN DATA
Standardized ID masks
The AI applies the correct punctuation to every CPF and CNPJ string. You get valid, human-readable formats instead of long digit strings.
BATCHED
Bulk processing
The tool handles large lists of numbers at once. You don't have to format IDs one by one.
VALIDATED
Type identification
The agent distinguishes between CPF and CNPJ patterns. It ensures the right mask is applied to the right ID type.
HUMAN
Review required
The AI handles the math and the masks, but you should still check the final list for any data entry errors.
The workflow
What your AI does when the data arrives.
The AI takes your unformatted text and runs it through a specific formatting logic.
Ingest raw strings
Your agent reads the raw, unformatted numbers from your provided source.
format_batchIdentify ID types
The AI looks at the length and structure of each string to tell if it is a CPF or a CNPJ.
format_batchApply masks
The tool inserts the dots, dashes, and slashes required for Brazilian standards.
format_batchOutput formatted list
The agent presents the final, masked list back to you in your chat window.
format_batch
Try it
Copy these to start.
Use these prompts to trigger the formatting task immediately.
Starting points
Replace the bracketed text with your actual data source, like a specific spreadsheet or a text block.
CPF/CNPJ Batch Processor Connector
You're all set. Choose your MCP client and follow the setup instructions.
https://edge.vinkius.com/vk_preview_lFNyu8UlZFkhP0wRgSvyc2AGW6mslkNnLO6XUQ8S/mcpClaude Desktop
Follow the steps below to connect in seconds.
- 1In Claude Desktop, open Settings → Connectors.
- 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
- 3Click Add and start a new chat — CPF/CNPJ Batch Processor capabilities are ready to use.
{
"mcpServers": {
"cpfcnpj-batch-processor-mcp": {
"url": "https://edge.vinkius.com/vk_preview_lFNyu8UlZFkhP0wRgSvyc2AGW6mslkNnLO6XUQ8S/mcp"
}
}
}Format this list of CPF numbers from my Google Sheet: [paste link or data]
Clean up these CNPJ strings in my current text file using the batch processor.
Take the raw digits in this CSV and turn them into formatted Brazilian IDs.
Format all the IDs in this chat history into standard CPF and CNPJ masks.
Claude
ChatGPT
Cursor
VS Code
Windsurf
Claude Code
JetBrains
Cline
Start here
Connect CPF/CNPJ Batch Processor once, then ask.
Just click the button to link the MCP to your client. Your credentials stay encrypted and the setup is instant.
Connect CPF/CNPJ Batch Processor to your AIFAQ
Common questions
- 01
Can the AI validate if a CPF is real?
No. This tool only applies formatting masks to existing digit strings. It does not perform checksum validation to see if the ID is legally valid.
- 02
Will it change my original files?
No. The AI only reads the data you provide and generates a new, formatted version in your chat. It cannot write back to or overwrite your original files.
- 03
Does it work for both CPF and CNPJ?
Yes. The tool identifies the difference between the two and applies the correct mask for each.
- 04
Can I format one number at a time?
Yes. While it is built for batches, you can give it a single string and it will format it correctly.
- 05
Do I need to tell it which mask to use?
No. The AI detects the number type automatically and applies the standard Brazilian mask.
More questions about CPF/CNPJ Batch Processor? The Connector page answers them. See everything the CPF/CNPJ Batch Processor Connector can do
Connect CPF/CNPJ Batch Processor to Claude, Cursor, ChatGPT & more
