Validating CPF or CNPJ is not an official registry lookup
A mathematically valid number may not belong to an active person or company. Use each verification for the right purpose.
Local CPF and CNPJ validators check length, impossible patterns and check-digit calculations. This catches typing errors before a form is submitted, but it does not turn a number into proof of identity.
Registry status, holder name and company details belong to official systems. Separating arithmetic validation from a registry lookup prevents bad decisions and unnecessary exposure of personal documents.
Verification levels
Mathematical structure
Registry status
Contextual decision
What the calculation confirms
CPF and CNPJ reserve positions for digits calculated from the preceding numbers. A mismatch means the sequence is structurally invalid. Repeated sequences and incorrect length can also be rejected.
A “valid” result only means the sequence follows those rules. Invented numbers can pass, and a cancelled or suspended record may still have correct digits.
When to use the official source
Use the Brazilian Federal Revenue service to confirm CPF registry status and issue or validate its certificate. The authority itself notes that registry status is not the person’s economic, financial or tax status.
For CNPJ, the official certificate displays the legal name, activities, address and status. For hiring, payments or supplier checks, use a current certificate and compare it with the intended relationship.
Protect privacy during checks
Do not publish full documents in screenshots. Prefer test numbers when developing and never try to infer a third party’s data. Browser processing reduces transmission but does not remove screen-sharing, clipboard or extension risks.
Enter only the required number and close the page on public devices. When identification has legal or financial consequences, obtain permission and follow the organization’s official procedure.
Recommended workflow
First remove punctuation and check structure locally. Then, for a legitimate purpose, visit the official domain directly and inspect status. Finally compare name, number, date and certificate context.
Do not treat a validator’s green result as credit approval, identity proof or authorization to contract. It is only a data-quality step.
Final checklist
- Use test numbers during development.
- Treat “valid” as correct structure, not confirmed identity.
- Use Federal Revenue for registry status.
- Do not expose documents in screenshots or public links.
- Confirm context before making a decision.
Put it into practice
CPF Validator
Use the free tool and compare your result with this guide’s checklist.
References
External sources used to confirm concepts and best practices covered in this guide.