CPF Generator
Get 1 to 10 random CPF numbers with correct check digits, masked as 000.000.000-00 or as plain 11 digits, ready to copy.The CPF Generator produces random Brazilian CPF numbers that pass the official check-digit test. Choose how many you want (1 to 10), leave the mask on for the familiar 000.000.000-00 format or turn it off for eleven bare digits, and press Generate CPF. Each number appears on a card with a copy button. Because the check digits are computed correctly, the numbers get past any form that validates CPF format, which is exactly what developers testing Brazilian sign-up flows need and exactly why they must never be used as if they belonged to a person.
Options
- Number of CPFs: 1 to 10 per click, default 5.
- Apply Mask: checked by default. On, you get 123.456.789-09; off, you get 12345678909.
The numbers come from the open-source gerador-validador-cpf library, which builds nine random digits and then calculates the two verification digits the same way Receita Federal does. There is no option to attach a date, a name or a state of issue; the tool makes the number and nothing else.
How a CPF is structured
A CPF (Cadastro de Pessoas Físicas) is the Brazilian individual taxpayer number. It has eleven digits written as NNN.NNN.NNN-DD:
- Digits 1–8: the registration number, assigned sequentially.
- Digit 9: the fiscal region where the CPF was issued. 0 is Rio Grande do Sul; 1 is the Federal District, Goiás, Mato Grosso, Mato Grosso do Sul and Tocantins; 2 is Acre, Amazonas, Amapá, Pará, Rondônia and Roraima; 3 is Ceará, Maranhão and Piauí; 4 is Alagoas, Paraíba, Pernambuco and Rio Grande do Norte; 5 is Bahia and Sergipe; 6 is Minas Gerais; 7 is Espírito Santo and Rio de Janeiro; 8 is São Paulo; 9 is Paraná and Santa Catarina.
- Digits 10–11: two check digits computed with a weighted modulo-11 sum. The first is calculated over the nine base digits with weights 10 down to 2; the second over the first ten digits with weights 11 down to 2. If the remainder is 0 or 1 the check digit is 0, otherwise it is 11 minus the remainder.
Numbers made of a single repeated digit (111.111.111-11 and so on) satisfy the arithmetic but are rejected by every real validator, and the library avoids producing them. The ninth digit here is random, so a generated CPF may claim a region that does not match whatever address you pair it with; if your test cares, pick the results whose ninth digit fits.
Valid is not the same as real
Passing the check-digit test only means the number is well-formed. Receita Federal's registry decides whether a CPF is actually assigned to someone, and a random well-formed number has a decent chance of colliding with a real registration, since over 200 million CPFs have been issued. That is why these numbers belong in test databases, mockups and validation tests, not in any real form. Using someone else's CPF, even accidentally, is fraud under Brazilian law.
Ways people use it
- Testing form validation. Generate ten masked numbers and confirm your CPF field accepts them, then flip a digit by hand to confirm it rejects the result.
- Seeding a staging database for a Brazilian e-commerce or fintech app that requires a CPF per customer. Ten per click with the mask off pastes straight into a CSV.
- Checking mask handling. Generate the same batch masked and unmasked to verify your front end strips and re-applies the dots and hyphen consistently.
- Demo screenshots where a real customer's document number must not appear.
Other Brazilian and international test identifiers are on the site too: the Random IMEI Number Generator and Random VIN Number Generator also produce checksum-valid codes, the Bank Account Number Generator covers banking fields, and the Random Email Generator fills the contact column. See all developer & test data tools for the rest.
Sample output
| Masked | Unmasked |
|---|---|
| 529.982.247-25 | 52998224725 |
| 111.444.777-35 | 11144477735 |
| 012.345.678-90 | 01234567890 |
All three pass the check-digit test. None is known to belong to anyone, but that cannot be guaranteed for any random number.
Frequently asked questions
- Are the generated CPF numbers valid?
They are mathematically valid: the two check digits are computed by the official modulo-11 rule, so any format validator accepts them. They are not registered with Receita Federal and may or may not coincide with a real person's number.
- Can I use a generated CPF to sign up for a Brazilian service?
No. Using a CPF that is not yours is document fraud in Brazil. These numbers are for software testing, mock data and demos only.
- Can I generate a CPF with a date of birth or a name?
No. The tool outputs the number only. A CPF does not encode a birth date; the only information inside it is the fiscal region in the ninth digit.
- What does Apply Mask do?
It formats the eleven digits as 000.000.000-00, which is how CPFs are printed on documents. Uncheck it to get the digits with no punctuation, which is what most APIs and databases store.
- How many CPFs can I generate at once?
Between 1 and 10 per click. Press Generate CPF again for a new batch; each run is independent.


