Brazil CPF Validator

Validate a Brazilian CPF with the mod-11 check digits.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Brazil CPF validator (mod-11)

The CPF (Cadastro de Pessoas Físicas) is Brazil’s individual taxpayer number, required for nearly every formal transaction — opening a bank account, signing a contract, or filing taxes. Its last two digits are a checksum, so a single typo usually makes the whole number invalid. This validator recomputes those check digits and tells you instantly whether a CPF is well-formed, which is useful for developers, form validation, and back-office checks.

How it works

A CPF is 11 digits: 9 base digits + 2 check digits. Each check digit is a weighted mod-11 sum:

  • First check digit — weight the 9 base digits by 10, 9, 8 … 2, sum them, take sum mod 11. The digit is 0 if the remainder is below 2, otherwise 11 − remainder.
  • Second check digit — repeat over the 9 base digits plus the first check digit, weighted 11, 10 … 2.

The CPF is valid only when both recomputed digits match what was entered. Reserved all-identical sequences (like 111.111.111-11) are rejected outright.

Example

Validate 529.982.247-25:

  • Base digits: 529982247.
  • First check digit weighting (10…2) gives a remainder that maps to 2.
  • Second check digit weighting (11…2) over 5299822472 maps to 5.
  • Entered check digits 25 match → valid CPF.

Check-digit rule

Remainder (sum mod 11)Check digit
0 or 10
29
38
11 − remainder
101

Privacy: the mod-11 calculation runs entirely in your browser. Your CPF is never uploaded or stored, and a valid result confirms internal consistency, not that the number is registered with Receita Federal.

Ad placeholder (rectangle)