CPF (Individual Taxpayer Registry) Generator
Generate valid CPFs for testing and development. All generated CPFs are mathematically valid.
⚠️ Important Notice
The generated CPFs are only mathematically valid and should be used exclusively for testing, development, and demonstrations. Do not use these numbers for fraudulent or illegal purposes.
How the CPF Generator Works?
The CPF Generator uses a two-step process to create a valid number. First, it generates nine random digits that form the base of the CPF. Then, it calculates the two check digits (DV) needed to complete the 11 numbers.
The calculation of the check digits follows the Modulo 11 algorithm, the same one used by the Brazilian Federal Revenue. The first DV is calculated based on the first nine digits; the second DV is calculated using the nine digits plus the first DV. This method ensures that any CPF generated here will pass form and system validations.
This process results in a mathematically correct CPF, ideal for developers and QA testers. For a detailed technical analysis of the calculation algorithm, Macoratti's publication on the subject offers an excellent implementation example.
Reference Article on CPF ValidationFacts about the CPF Generator
- The CPF Generator creates random numbers for testing purposes.
- The tool applies the Modulo 11 algorithm to calculate the check digits.
- The generated CPFs have a mathematically valid format.
- CPF generation does not query the Federal Revenue database.