Skip to main content

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:

PositionFieldLengthMeaning & RuleExample
1 to 8Sequential Number8 digitsUnique citizen sequential base registration number12345678
9Fiscal Region1 digitFederal Revenue fiscal jurisdiction code (e.g. 8 for SP, 7 for RJ/ES, 6 for MG)8
10 & 11Check Digits2 digitsDual Modulo 11 check digits computed with weights 10..2 and 11..290

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. 1. Multiply the first 9 digits by descending weights from 10 to 2.
  2. 2. Sum the products and take remainder modulo 11.
  3. 3. If remainder < 2, CD1 is 0; otherwise CD1 = 11 - remainder.
  4. 4. For CD2, multiply first 9 digits by weights 11 to 3 and CD1 by weight 2.
  5. 5. If remainder < 2, CD2 is 0; otherwise CD2 = 11 - remainder.
  6. 6. Sequence strings with 11 identical digits are rejected.

Frequently Asked Questions (FAQ)