RFC Validator
RFC (Mexican tax ID) · Issuer: SAT. CFDI 4.0 e-invoicing, customer onboarding, payroll, Mexican marketplaces.
Free online validator
Validated with the public algorithm; we don't store your input.Format
13 characters for individuals (4 letters + YYMMDD date + 3-char homoclave) or 12 for companies (3 letters).
Check-digit algorithm
- Validate structure and a real date.
- Last char is the check: characters map to values (0–9, A=10 … N=23, &=24, O=25 … Z=36, space=37, Ñ=38).
- Weighted sum with weights 13..2 (companies are left-padded with a space), 11 − (sum mod 11); 11 → 0, 10 → A.
Use cases
CFDI 4.0 e-invoicing, customer onboarding, payroll, Mexican marketplaces.
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":"MX_RFC","value":"OTZU910208G36"}'
# Python
import requests
r = requests.post("https://validalatam.p.rapidapi.com/validate", json={"type": "MX_RFC", "value": "OTZU910208G36"},
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: "MX_RFC", value: "OTZU910208G36" }) });
const { valid, formatted, error } = await r.json();
# Response
{
"valid": true,
"type": "MX_RFC",
"country": "MX",
"input": "OTZU910208G36",
"normalized": "OTZU910208G36",
"formatted": "OTZU910208G36"
}
API plans on RapidAPI
Free plan to get started; paid plans for production volume and batch validation (up to 1000 per request).
FAQ
How is the RFC check digit calculated?
Validate structure and a real date. Last char is the check: characters map to values (0–9, A=10 … N=23, &=24, O=25 … Z=36, space=37, Ñ=38). Weighted sum with weights 13..2 (companies are left-padded with a space), 11 − (sum mod 11); 11 → 0, 10 → A.
What is the RFC format?
13 characters for individuals (4 letters + YYMMDD date + 3-char homoclave) or 12 for companies (3 letters).
Does it accept generic RFC XAXX010101000?
Yes, it's structurally valid; filter it if your use case forbids it.
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.