CPF Generator

This tool generates FICTITIOUS CPFs for testing purposes only. Never use these numbers for real registrations or official purposes!

Free online tool to generate valid CPFs for developers, software testers (QA), and programming students. Generate fictitious numbers with mathematically correct check digits, by Brazilian state, in formatted or numbers-only format. Ideal for system testing, form validation, and development environments.

What is a CPF and How Does the Algorithm Work?

The CPF (Cadastro de Pessoas Físicas) is the Brazilian tax identification document issued by the Federal Revenue Service of Brazil. This unique 11-digit number is mandatory for all Brazilian citizens and foreign residents. The CPF structure consists of 9 identifying digits followed by 2 check digits calculated through a double modulo-11 algorithm, developed to detect typing errors and validate the authenticity of the number.

How to Use the CPF Generator

Our CPF generator is the ideal solution for various everyday situations for developers and technology professionals:

  • Registration form validation and web systems testing
  • Automated testing of systems and web applications
  • Populating staging and homologation databases
  • Integration testing with APIs and external services
  • Client demonstrations and presentations without exposing real data

Technical Details and Fiscal Regions

The CPF has technical characteristics that few developers know in depth:

  • Check Digit Algorithm: two sequential modulo-11 operations ensure any valid CPF passes Brazil's Federal Revenue mathematical validation
  • 9th Digit = Fiscal Region: indicates the Brazilian state of issuance — from 0 (RS) to 9 (PR/SC)
  • Standard format: 11 digits structured as NNN.NNN.NNN-DD, where DD are the two check digits
  • Unique generation: up to 100 non-repeating CPFs per session, with uniqueness control via Map

CPF Fiscal Regions Table

0: Rio Grande do Sul (RS)
1: Federal District (DF), Goiás (GO), Mato Grosso (MT), Mato Grosso do Sul (MS), Tocantins (TO)
2: Acre (AC), Amapá (AP), Amazonas (AM), Pará (PA), Rondônia (RO), Roraima (RR)
3: Ceará (CE), Maranhão (MA), Piauí (PI)
4: Alagoas (AL), Paraíba (PB), Pernambuco (PE), Rio Grande do Norte (RN)
5: Bahia (BA), Sergipe (SE)
6: Minas Gerais (MG)
7: Espírito Santo (ES), Rio de Janeiro (RJ)
8: São Paulo (SP)
9: Paraná (PR), Santa Catarina (SC)

Frequently Asked Questions

Is this CPF real or can it be used for official registrations?

No. Generated CPFs are fictitious and not registered with Brazil's Federal Revenue Service. They pass mathematical check digit validation, but have no legal or documentary validity. Use exclusively for software testing and development.

Why does the 9th digit of a CPF indicate a Brazilian state?

Brazil's Federal Revenue organizes its registry by fiscal regions. The 9th digit (before the check digits) encodes this region: 8 for São Paulo, 7 for ES/RJ, 0 for RS, for example. Our tool allows filtering by state to create specific regional test scenarios.

What is the difference between formatted and numbers-only format?

The 999.999.999-99 format is the standard visual format used in forms, documents, and interfaces. The 99999999999 format (numbers only) is preferred for backend validations, API integrations, and database storage.

Is it legal to use this CPF generator?

Yes, for software testing, educational purposes, and technical demonstrations. Using fictitious or third-party CPFs for official registrations, fraud, or obtaining undue benefits is a crime under Brazilian Penal Code (Art. 299).

[ Wikipedia: CPF (Cadastro de Pessoas Físicas), CPF Number ]

See also: