CPF & CNPJ Validator - Bulk Brazilian Tax ID Check
Pricing
Pay per usage
CPF & CNPJ Validator - Bulk Brazilian Tax ID Check
Validate up to 10,000 Brazilian CPF and CNPJ numbers offline: mod-11 check digits, formatting, alphanumeric CNPJ (RFB 2026), and a clear reason for every invalid value. No Receita Federal lookup, no API key.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
KotaBlue Toolsmith
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
18 days ago
Last modified
Categories
Features
Share
CPF & CNPJ Validator: Bulk Brazilian Tax ID Check Digits (Offline)
Paste a list of Brazilian CPF and CNPJ numbers in any common format and validate them all in one run. Each line gets one spreadsheet-ready row: VALID, INVALID or REPEAT, a plain-English reason, the document type, the value formatted and stripped, the check digits, and a flag for alphanumeric CNPJ.
Up to 10,000 lines per run, checked offline with the public mod-11 verifier used for CPF and CNPJ: no API key, no login, no proxy, and your numbers are not sent to Receita Federal or any outside service. Built for cleaning CRM and KYC imports, rejecting typed-digit placeholders before a registry lookup, and supporting the alphanumeric CNPJ format (Receita Federal, from July 2026).
What does this CPF / CNPJ validator do?
- Checks CPF and CNPJ check digits. Uses the standard mod-11 algorithm for CPF (Cadastro de Pessoas Físicas, 11 digits) and CNPJ (Cadastro Nacional da Pessoa Jurídica, 14 characters).
- Supports alphanumeric CNPJ. Accepts the new RFB format where the first 12 positions may contain letters A–Z (for example
12.ABC.345/01DE-35), with numeric check digits, per Nota Técnica 49/2024. - Formats for display and storage. Returns
295.379.955-93/54.550.752/0001-55style formatting plus a punctuation-free stripped value ready for databases. - Reads messy input. Dots, dashes, slashes, spaces, a leading
CPF:/CNPJ:label and mixed case letters are handled. - Auto-detects the type. 11 digits → CPF, 14 characters → CNPJ. Override with a per-line hint (
…, CPF) or a run-wide Default type. - Rejects known placeholders. Values like
111.111.111-11or00.000.000/0000-00are flaggedALL_SAME_DIGITSinstead of looking "valid". - Finds duplicates across formats.
295.379.955-93and29537995593are the same CPF; the second one comes back asREPEAT. - One clear status per line.
VALID,INVALIDwith a reason code, orREPEAT. Rows keep your input order.
Who is this for?
- KYC, KYB and onboarding teams. Pre-validate Brazilian tax IDs before calling a paid registry or enrichment API, and drop obvious typos and placeholders.
- Fintech, payments and banking ops. Clean CPF/CNPJ columns in account-opening, PIX and merchant onboarding files.
- CRM, ERP and data-quality teams. Standardise tax-ID fields in Salesforce, HubSpot, ERP or spreadsheet exports and remove duplicates written with different punctuation.
- E-commerce and marketplace sellers. Check seller or buyer tax IDs collected at signup before pushing them into fiscal tooling.
- Developers and automation builders. Validate CPF/CNPJ fields in bulk from the Apify API, Make, Zapier or n8n with no Brazilian proxy and no Receita Federal scraping.
- Compliance and audit support. Produce a clear VALID/INVALID trail with reason codes for each input line (this is a data-quality check, not a registration proof).
- Spreadsheet users. Paste a column from Excel or Google Sheets and export the results back as CSV or Excel.
- Teams preparing for alphanumeric CNPJ. Start accepting letter-bearing CNPJs before July 2026 without changing your pipeline later.
How to use it
- Open the Actor and paste numbers into CPF / CNPJ numbers to validate, one per line. Punctuation is optional.
- Leave Default document type on Auto-detect by length, or set CPF / CNPJ to force a type for the whole run.
- For a single odd line, add a type hint after a comma, semicolon,
|or tab, for example29537995593, CPF. - Click Start, then open the Output tab and filter on
status,reasonordocumentType. - Export as CSV, Excel or JSON, or call the Actor from the Apify API, Make, Zapier or n8n.
- Feed only the
VALIDrows into your Receita Federal / Serasa / enrichment step if you still need a live registry check.
Input
| Field | Description |
|---|---|
documents | One CPF or CNPJ per line, optionally followed by , CPF or , CNPJ. Max 10,000 lines per run. |
defaultType | AUTO (default), CPF or CNPJ. Auto-detect uses cleaned length (11 = CPF, 14 = CNPJ). A per-line hint always wins. |
Example input (well-known library examples, one alphanumeric CNPJ, a blacklist CPF, a bad checksum, a short value, a repeat and a labelled CPF):
{"documents": ["295.379.955-93","54.550.752/0001-55","12.ABC.345/01DE-35","111.111.111-11","295.379.955-94","123","295.379.955-93","CPF: 390.533.447-05"],"defaultType": "AUTO"}
Output
Each input line gives one dataset row. Fields:
input, inputIndex, status, reason, firstStatus, message, documentType, documentFormatted, documentStripped, checkDigits, base, isAlphanumeric, typeSource, validatedAt
Below are real rows from a local run on Nov 4, 2026 (America/Chicago) with the example input above. Empty fields and timestamps are left out; the same input is used for the cloud test.
A valid CPF:
{"input": "295.379.955-93","inputIndex": 1,"status": "VALID","message": "Valid CPF check digits (mod-11). A valid checksum does not prove the CPF is registered with Receita Federal or that the holder exists.","documentType": "CPF","documentFormatted": "295.379.955-93","documentStripped": "29537995593","checkDigits": "93","base": "295379955","isAlphanumeric": false,"typeSource": "LENGTH"}
A valid numeric CNPJ and a valid alphanumeric CNPJ:
{"input": "54.550.752/0001-55","inputIndex": 2,"status": "VALID","documentType": "CNPJ","documentFormatted": "54.550.752/0001-55","documentStripped": "54550752000155","checkDigits": "55","isAlphanumeric": false}
{"input": "12.ABC.345/01DE-35","inputIndex": 3,"status": "VALID","message": "Valid CNPJ check digits (mod-11). This is the alphanumeric CNPJ format (Receita Federal, from July 2026). A valid checksum does not prove the CNPJ is registered with Receita Federal or that the company is active.","documentType": "CNPJ","documentFormatted": "12.ABC.345/01DE-35","documentStripped": "12ABC34501DE35","checkDigits": "35","isAlphanumeric": true}
An invalid blacklist CPF, a bad checksum, a short value and a repeat of the first CPF:
{ "input": "111.111.111-11", "status": "INVALID", "reason": "ALL_SAME_DIGITS", "documentType": "CPF" }
{ "input": "295.379.955-94", "status": "INVALID", "reason": "CHECKSUM_FAILED", "documentType": "CPF", "documentStripped": "29537995594" }
{ "input": "123", "status": "INVALID", "reason": "WRONG_LENGTH" }
{ "input": "295.379.955-93", "inputIndex": 7, "status": "REPEAT", "firstStatus": "VALID", "message": "Same CPF as input #1, which was VALID.", "documentType": "CPF" }
Status and reason codes
| Status | Meaning |
|---|---|
VALID | Check digits match for the detected or requested type. |
INVALID | Failed a format or checksum rule; see reason. |
REPEAT | Same type + stripped value as an earlier line in this run. |
| Reason | Meaning |
|---|---|
EMPTY | Blank line. |
INPUT_TOO_LONG | Line longer than 80 characters. |
UNKNOWN_TYPE_HINT | Type hint was not CPF or CNPJ. |
BAD_CHARACTERS | Characters left that the type does not allow. |
WRONG_LENGTH | Not 11 (CPF) or 14 (CNPJ) after cleaning. |
TYPE_MISMATCH | Forced type does not match the value length. |
ALL_SAME_DIGITS | Rejected placeholder such as 111.111.111-11. |
CHECKSUM_FAILED | Mod-11 verifier digits do not match. |
AMBIGUOUS_TYPE | Could not choose CPF vs CNPJ (rare; add a hint). |
What a VALID result does and does not mean
A VALID row means only that the check digits are correct for that CPF or CNPJ string. It does not mean:
- the number is registered with Receita Federal;
- the person or company exists, is active, or matches a name you hold;
- the number is cleared for KYC, credit, tax filing or contracting.
Use this Actor to reject typos and placeholders cheaply, then call an official or licensed registry when you need proof of registration.
Pricing
Currently free (not monetized). You only pay Apify platform usage for the run. A future per-result price may be added later; INVALID and REPEAT rows are intended to stay free if pricing is turned on.
Limits and performance
- 10,000 documents per run (extra lines are skipped and counted in the run summary).
- Offline only. No Receita Federal, no Serasa, no network calls per row.
- 128 MB default memory. A 10,000-document check finishes in well under a second of CPU time on a small heap; cloud runs typically peak far below 128 MB.
- Default run options: 300 s timeout, 128 MB. Raise memory only if you combine this Actor with heavy downstream steps in the same process.
- Rows are written in batches of 500 and keep your input order.
FAQ
Is this an official Receita Federal service?
No. It is an independent data-quality tool. It is not affiliated with, endorsed by or approved by Receita Federal do Brasil, the Brazilian Federal Revenue Service, or any Brazilian government body.
Do you look up the CPF/CNPJ in a registry?
No. Everything is offline checksum and format validation. A valid checksum is not proof of registration.
Does it support alphanumeric CNPJ?
Yes. The first 12 positions may be A–Z or digits; the two check digits stay numeric, following the RFB alphanumeric CNPJ rules.
Can I mix CPF and CNPJ in one run?
Yes. With Default type AUTO, each line is classified by length. Use a per-line hint when you need to force a type.
What about punctuated vs plain numbers?
Both work. 295.379.955-93 and 29537995593 validate the same way and share one REPEAT key.
Why is 111.111.111-11 invalid?
Repeated-digit placeholders are on a reject list. They are commonly typed into forms and must not pass as valid IDs.
Is my data sent anywhere?
No outside document API is called. Processing stays inside the Actor run on Apify.
How is this different from a CNPJ scraper?
Scrapers call Receita Federal or third-party sites for company data and need proxies or keys. This Actor only checks format and check digits, so it is faster, cheaper and has no registry terms to navigate.
Related tools
- IBAN Validator — bulk IBAN & BIC/SWIFT check digits offline.
- Phone Number Validator — bulk E.164 phone validation and formatting offline.
- OFAC SDN Sanctions Screening — bulk name screening against the U.S. Treasury SDN list.
- LEI Lookup & Renewal Checker — bulk LEI status and lapsed-LEI checks (GLEIF).
- SEC EDGAR Company Lookup — ticker/CIK to U.S. company filings.
- ISIN / CUSIP / Ticker to FIGI + LEI Mapper — map security identifiers to FIGI and LEI.
Libraries, attribution and disclaimer
- Check-digit logic is provided by @fnando/cpf and @fnando/cnpj (MIT Licence, Copyright (c) 2018 Nando Vieira). The CNPJ library implements the alphanumeric algorithm documented by Receita Federal.
- CPF and CNPJ are Brazilian public identifiers. This Actor redistributes no Receita Federal registry data.
- Not affiliated with, endorsed by or approved by Receita Federal do Brasil, the Brazilian government, or the authors of the libraries above beyond the MIT licence terms.
- Results are a data-quality aid only, not legal, tax, KYC or credit advice. Always confirm registration through official or licensed channels when that proof is required.
- Keep the MIT copyright notice when you redistribute the libraries.
Built by kotablue-tools. Found a bug or want a field added? Open an issue on the Actor page.