CPF Generator
Generate valid CPF numbers for testing and development. Supports batch generation with formatted or raw output. Built for developers and QA teams.
The 9th digit of the CPF indicates the fiscal region of issuance.
Enter 11 digits (with or without formatting)
Was this tool helpful?
Thank you for your feedback!
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.