Skip to content

CPF Generator

Generate valid CPF numbers for testing and development. Supports batch generation with formatted or raw output. Built for developers and QA teams.

No sign-up 100% free Private
Options

The 9th digit of the CPF indicates the fiscal region of issuance.

The result will appear here

Was this tool helpful?

CPF Generator for Testing

Our CPF generator creates mathematically valid CPF numbers for use in software testing and development environments. Every generated number follows the official Module 11 algorithm from Brazil's Receita Federal, ensuring that the two check digits are correctly calculated — exactly as they would be in a real CPF issued to a Brazilian citizen.

The generation process is entirely random and client-side: nine base digits are randomly selected using crypto.getRandomValues() for true randomness, the two check digits are computed using weighted sums and modulo 11, and the result is displayed instantly in your browser. No data is ever sent to our servers, ensuring complete privacy and zero latency. The tool avoids generating invalid sequences such as all-identical digits (111.111.111-11, 222.222.222-22, etc.), which are rejected by all validation systems.

You can generate CPFs individually or in batches of up to 50 at a time, with optional formatting (XXX.XXX.XXX-XX). Each generated CPF is unique within the batch. This is ideal for developers who need to populate test databases, validate form inputs, run automated end-to-end tests, simulate user registrations in staging environments, or test payment gateway integrations that require valid CPF numbers.

How the Module 11 algorithm works: The first check digit is calculated by multiplying each of the first 9 digits by weights 10, 9, 8, 7, 6, 5, 4, 3, 2, summing the products, dividing by 11, and subtracting the remainder from 11 (or using 0 if the remainder is less than 2). The second check digit follows the same logic but uses the first 10 digits with weights 11 through 2. This dual verification makes accidental digit transposition extremely unlikely to produce a valid CPF.

Legal notice: Generated CPFs are fictitious and do not correspond to any real person registered with the Receita Federal. Using fabricated CPFs for fraud, identity theft, or any illegal purpose is a crime under Articles 298 and 304 of the Brazilian Penal Code. This tool is intended exclusively for software testing.

Need to verify whether a CPF is valid? Use our CPF Validator. For business identification numbers, check out our CNPJ Generator or the upcoming Alphanumeric CNPJ Generator for the new format effective July 2026.

Frequently Asked Questions

Are generated CPFs real?
No. They are mathematically valid but randomly generated. They are not linked to any real person. To verify an existing CPF, use our CPF Validator.
Can I use them in production?
No. These CPFs are for development and testing only. Using fictitious CPFs for fraud is illegal under Brazilian law (Articles 298 and 304 of the Penal Code).
How many CPFs can I generate at once?
Up to 50 CPFs per batch, formatted or unformatted. All generated 100% in your browser — no data is sent to any server. Need to check an existing number? Use our CPF Validator.
How do I copy the generated CPFs?
Each generated CPF has a copy button next to it. For batches, there's an option to copy all at once, separated by line breaks. Works on both mobile and desktop.
Can I choose the state of origin for the CPF?
Yes. The eighth digit of a CPF indicates the tax region of issuance. You can select a specific state in the dropdown or leave it as random. Useful for testing region-dependent business rules.
Is my data collected when generating CPFs?
No. Generation happens 100% in your browser using JavaScript. No information is sent to our servers. You can even disconnect from the internet and continue using the tool.
Do generated CPFs pass validators?
Yes. Every generated CPF uses the official Module 11 algorithm with correct check digits. It will pass any CPF validator, including our CPF Validator. However, it won't be registered with the Receita Federal.
What's the difference between generated and real CPFs?
Mathematically, none — both follow the same Module 11 algorithm. The difference is that generated CPFs aren't registered in the Receita Federal database and don't belong to any person. For business identification, use our CNPJ Generator.