{"uid":"cap_IkX6GfU8Fl1Hi4dknmt1J","slug":"toll402-cpf-cnpj-validator-4890581b","name":"Toll402 CPF/CNPJ Validator","description":"Offline validator for Brazilian CPF (individual) and CNPJ (company) registration numbers. Strips formatting, checks length, rejects known invalid sequences (all same digit), and recomputes the official modulo-11 check digits for both formats.","url":"https://toll402.dev/v1/t/cpf_cnpj_validate","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","properties":{}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Kjmn7aFzvQSc00NYg5Sk4","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Offline validator for Brazilian CPF (individual) and CNPJ (company) registration numbers using modulo-11 check digit verification","exampleAgentPrompt":"Can you validate this Brazilian CPF number for me — 123.456.789-09 — and tell me if it's legitimate with correct check digits?","exampleUseCases":[{"title":"KYC check for Brazilian user","prompt":"Before onboarding this new Brazilian customer, validate their CPF number 529.982.247-25 — I need to know if the check digits are correct and it's not a known invalid sequence."},{"title":"Vendor CNPJ verification before payment","prompt":"I need to verify the CNPJ 11.222.333/0001-81 for a Brazilian supplier before I process their invoice — can you check if it's a valid company registration number?"},{"title":"Bulk form submission pre-screening","prompt":"I'm about to submit a government form for a Brazilian individual — their CPF is 046.915.683-40. Can you validate it first so we don't get a rejection from the tax authority?"}],"resultDescription":"Returns a validation result indicating whether the CPF or CNPJ is valid, along with the reason for rejection if invalid (e.g. wrong length, all-same-digit sequence, or failed modulo-11 check digit verification). May also return a normalized/stripped version of the input number.","failureModes":["Input is neither a valid-length CPF (11 digits) nor CNPJ (14 digits) — returns invalid with length error","Number consists of all identical digits (e.g. 111.111.111-11) — rejected as known invalid sequence","Check digits do not match modulo-11 recomputation — returns invalid with check digit mismatch","Non-numeric characters remain after stripping that corrupt the digit count — returns format error","Missing or malformed request body — returns HTTP 400 or equivalent schema validation error"],"whenToPreferThis":"Choose this endpoint when you need a fast, offline, algorithmic check of Brazilian CPF or CNPJ numbers without making a live query to Receita Federal or any government database. Ideal for pre-validation before submitting forms, KYC pipelines, or data quality checks where you want to catch obviously invalid numbers (wrong length, all-same-digit, bad check digits) instantly and cheaply. Not suitable if you need to confirm whether a CPF/CNPJ is actually registered and active — that requires a live government lookup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:45:37.131Z","isFirstParty":false}