CPF Validator
Validate CPF numbers (Cadastro de Pessoas Físicas) quickly and securely.
About the CPF Validator
The CPF Validator is an online tool that checks if a CPF number (Cadastro de Pessoas Físicas) is mathematically valid, according to the verification digit calculation algorithm defined by the Brazilian Federal Revenue.
This tool is ideal for developers, testers (QAs), and students who need to verify CPF validation logic in their systems. A CPF validated here will pass format checks, but it is crucial to understand that this does not mean the CPF exists or belongs to a real person.
Anatomy & Structure of Brazilian CPF
The Brazilian Individual Taxpayer Registry (CPF) consists of 11 decimal digits in 3 segments:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 to 8 | Sequential Number | 8 digits | Unique citizen sequential base registration number | 12345678 |
| 9 | Fiscal Region | 1 digit | Federal Revenue fiscal jurisdiction code (e.g. 8 for SP, 7 for RJ/ES, 6 for MG) | 8 |
| 10 & 11 | Check Digits | 2 digits | Dual Modulo 11 check digits computed with weights 10..2 and 11..2 | 90 |
Official CPF Algorithm (Brazilian Federal Revenue Modulo 11)
CPF integrity is enforced through two sequential Modulo 11 check calculations:
CD1 = (Sum1 % 11 < 2 ? 0 : 11 - Rem1); CD2 = (Sum2 % 11 < 2 ? 0 : 11 - Rem2)
- 1. Multiply the first 9 digits by descending weights from 10 to 2.
- 2. Sum the products and take remainder modulo 11.
- 3. If remainder < 2, CD1 is 0; otherwise CD1 = 11 - remainder.
- 4. For CD2, multiply first 9 digits by weights 11 to 3 and CD1 by weight 2.
- 5. If remainder < 2, CD2 is 0; otherwise CD2 = 11 - remainder.
- 6. Sequence strings with 11 identical digits are rejected.
Frequently Asked Questions (FAQ)
If a CPF is valid, does it belong to someone?
Not necessarily. Validation is purely mathematical and does not consult the Federal Revenue database. It only confirms that the number follows the formation rules. For testing purposes, this is sufficient to validate forms and systems.
Is it safe to use this tool?
Yes. All validation happens in your browser (client-side). No entered CPF is sent to our servers, ensuring your privacy.
Why is a CPF with all identical numbers (e.g., 111.111.111-11) invalid?
Although these numbers may pass the verification digit calculation, they are considered invalid by an exception rule. The Federal Revenue blocks these sequences to prevent fraud and errors. Our tool also applies this check.