✅ ValidaLatam All validators · API docs · RapidAPI · ES

CPF Validator

CPF (Brazilian individual taxpayer ID) · Issuer: Receita Federal. Brazilian e-commerce checkout, NF-e invoices, fintech KYC, Pix.

Free online validator

Validated with the public algorithm; we don't store your input.

Format

11 digits formatted 000.000.000-00: 9 base digits and 2 check digits.

Check-digit algorithm

  1. First check digit: weights 10..2 on the 9 base digits; sum×10 mod 11 (10 → 0).
  2. Second: weights 11..2 on the first 10 digits; same rule.
  3. Repeated sequences (111.111.111-11) are rejected even though they pass the math.

Use cases

Brazilian e-commerce checkout, NF-e invoices, fintech KYC, Pix.

Code examples

# curl (RapidAPI)
curl -X POST "https://validalatam.p.rapidapi.com/validate" -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: $RAPIDAPI_KEY" -H "X-RapidAPI-Host: validalatam.p.rapidapi.com" \
  -d '{"type":"BR_CPF","value":"52203819898"}'
# Python
import requests
r = requests.post("https://validalatam.p.rapidapi.com/validate", json={"type": "BR_CPF", "value": "52203819898"},
                 headers={"X-RapidAPI-Key": KEY, "X-RapidAPI-Host": "validalatam.p.rapidapi.com"})
print(r.json()["valid"], r.json()["formatted"])
// JavaScript (fetch)
const r = await fetch("https://validalatam.p.rapidapi.com/validate", { method: "POST",
  headers: { "Content-Type": "application/json", "X-RapidAPI-Key": KEY, "X-RapidAPI-Host": "validalatam.p.rapidapi.com" },
  body: JSON.stringify({ type: "BR_CPF", value: "52203819898" }) });
const { valid, formatted, error } = await r.json();
# Response
{
  "valid": true,
  "type": "BR_CPF",
  "country": "BR",
  "input": "52203819898",
  "normalized": "52203819898",
  "formatted": "522.038.198-98"
}

API plans on RapidAPI

Free plan to get started; paid plans for production volume and batch validation (up to 1000 per request).

See plans on RapidAPI →

FAQ

How is the CPF check digit calculated?

First check digit: weights 10..2 on the 9 base digits; sum×10 mod 11 (10 → 0). Second: weights 11..2 on the first 10 digits; same rule. Repeated sequences (111.111.111-11) are rejected even though they pass the math.

What is the CPF format?

11 digits formatted 000.000.000-00: 9 base digits and 2 check digits.

Does the CPF reveal the state?

The 9th digit indicates the issuing fiscal region (e.g. 8 = São Paulo).

Is this validator free?

Yes, the web tool is free. To integrate it, use the API: there's a free plan on RapidAPI.

Does the API store the numbers I validate?

No. Validation is deterministic, with no storage and no third-party lookups.

Other validators

CNPJ · BrazilCUIT · ArgentinaCUIL · ArgentinaDNI · ArgentinaCBU · ArgentinaCVU · ArgentinaRFC · MexicoCURP · MexicoCLABE · Mexico