Ontoom

CPF validator

Validate check digits and see the CPF tax region.

CPF

Important: Synthetic data for testing. Misuse is the user's responsibility.

What this tool does

The CPF validator checks whether an 11-digit number passes the two check digits (modulo 11) and whether it is not a sequence of identical digits. The result is mathematical. The page does not query the Brazilian tax authority, does not say whether the number is active, and does not prove that a person exists.

You can paste the CPF with the mask (000.000.000-00) or as digits only. Dots and the hyphen are ignored in the calculation. The ninth digit is shown as the historical fiscal region: an old convention for where the number was issued, not anyone's current address. To mint a new synthetic number, use the CPF generator.

How to use it

  1. Paste the CPF into the field, with or without punctuation.
  2. Click Validate. The math runs in the browser.
  3. Read whether both check digits match what the algorithm expects. On a mismatch, the page shows the expected digit and the one in your text.
  4. If the number is valid, treat the region as a testing hint only. It is not a document.

How the digits are calculated

The first nine digits are the base. The first check digit uses weights 10, 9, 8, 7, 6, 5, 4, 3, and 2. Multiply each digit by its weight, sum, take the remainder modulo 11, and if the remainder is less than 2 the digit is 0; otherwise it is 11 minus the remainder. The second check digit repeats the sum with the nine digits plus the first check digit and weights 11 down to 2.

Sequences such as 000.000.000-00 or 111.111.111-11 are rejected even if modulo 11 would land on those digits, because the CPF rule treats those patterns as invalid. Too few or too many digits fail before the check digits are compared.

Example

529.982.247-25 passes this validator. The base is 529982247. The calculated first check digit is 2 and the second is 5, which are the last two digits of the number. The ninth digit is 7, shown on this page as the historical region ES and RJ. That does not mean the number belongs to anyone in those states.

Change only the last digit to 529.982.247-26. The validator marks the second check digit as wrong: the expected digit is still 5 and the received digit is 6. The CPF generator is for a new base; come back here to check a number you typed by hand.

valid:    529.982.247-25
invalid:  529.982.247-26  (2nd check digit expected 5, received 6)

Frequently asked questions

Does a valid result mean the person exists?
No. The page only applies modulo 11, the 11-digit length, and the rejection of repeated sequences. A real registry lookup requires an authorized query this tool does not make.
Can I paste dots and a hyphen?
Yes. 529.982.247-25 and 52998224725 are the same input for the math. Letters and symbols outside the mask are not part of the digit string.
What is the fiscal region?
It is the historical map of the ninth digit (0 through 9) to a group of states. In 529.982.247-25 the ninth digit is 7, shown as ES and RJ. It is not a current place of issue.
Why is 111.111.111-11 invalid?
Because the page rejects the ten sequences in which all eleven digits are the same, and it also checks the two check digits.
Does the number leave the browser?
Not by using the validator. The calculation stays on your device. Do not paste a real customer's CPF into any page if the case calls for secrecy.

Written by Orlando Alves · reviewed on · Editorial policy

See also