The One Bill

Restaurant, travel, rentals…

Split bills without hassle

Organize group expenses with the agility of a spreadsheet.

CPF Generator

Generate random valid CPF numbers with optional fiscal region targeting

The ninth CPF digit identifies a Brazilian fiscal region. Choose any region to randomize it or target one for localized test data.

About
Generate realistic CPF test data with checksum validation, optional masking, and fiscal region control.

What is CPF?

The Cadastro de Pessoas Fisicas (CPF) is the Brazilian taxpayer identification number issued to individuals. It is commonly requested in banking, hiring, e-commerce, shipping, and government-related forms.

A CPF has 11 digits. The first 9 form the base number and the last 2 are verifier digits calculated from the previous digits to reduce typing mistakes. (wikipedia)

What a CPF number looks like

A CPF is written as 000.000.000-00: eleven digits in three groups of three separated by dots, then a dash and the last two. The first nine digits are the base number (the ninth also marks the fiscal region) and the last two are the check digits.

Forms and APIs usually accept it either way: with the dots and dash (481.683.895-30) or as 11 digits only (48168389530).

How to check a CPF by hand

Here is the check on 481.683.895-30, a number this generator produced. Its base is the first nine digits.

First check digit: multiply the nine base digits by the weights 10 down to 2, add the results and divide the sum by 11.

4×10 + 8×9 + 1×8 + 6×7 + 8×6 + 3×5 + 8×4 + 9×3 + 5×2 = 294
294 mod 11 = 8
11 − 8 = 3

Second check digit: add the first check digit to the end of the base, multiply those ten digits by the weights 11 down to 2 and divide by 11 again.

4×11 + 8×10 + 1×9 + 6×8 + 8×7 + 3×6 + 8×5 + 9×4 + 5×3 + 3×2 = 352
352 mod 11 = 0
0 < 2 → 0

The rule is the same for both: if the remainder is less than 2, the check digit is 0; otherwise it is 11 minus the remainder. That gives 3 and 0, the last two digits of 481.683.895-30, so the number passes.

A passing check only means the number is well formed. It does not mean the CPF was issued or belongs to anyone, and this site never looks up real records.

Numbers made of one repeated digit, such as 111.111.111-11, pass the math too, but real validators reject them. This generator never outputs them.

Generate one and try it

Fiscal region digit

The ninth CPF digit is traditionally associated with a Brazilian fiscal region. This generator lets you keep that digit random or lock it to a specific region when you need localized test data.

Generation and validation of CPF

This tool calculates both verifier digits with the modulo 11 checksum rules used in CPF validation. It also avoids generating the well-known repeated-digit sequences that many systems reject immediately.

Using the tool

Use the mask option when you need punctuation in the standard 000.000.000-00 format, or disable it when an API expects digits only. Increase the amount field to create bulk samples for QA, demos, and automated tests.

The One Generator

We got more utilities for you...

Generators in a dashboard

Select several utilities and put them in a dashboard.