Generate random valid-format CPF (Cadastro de Pessoas Físicas) numbers for testing
Paste a CPF (Cadastro de Pessoas Físicas) below to check whether it has a valid format and correct checksum.
The CPF (Cadastro de Pessoas Físicas, or Individual Taxpayer Registry) is an 11-digit number issued by the Receita Federal (Brazilian Federal Revenue) to Brazilian citizens and foreign residents who earn income in Brazil. Created in 1965, the CPF is essential for virtually all financial and legal activity: opening bank accounts, filing taxes, signing contracts, making purchases above certain thresholds, and accessing public services including healthcare and social security benefits.
A CPF is formatted as XXX.XXX.XXX-DD, where the first nine digits are the base number and the last two (DD) are verification digits. CPF numbers where all eleven digits are identical — from 000.000.000-00 through 999.999.999-99 — are mathematically valid by the checksum algorithm but are explicitly declared invalid by the Receita Federal. Historically, each Brazilian state was associated with specific digit ranges in the ninth position, though this geographic encoding is no longer enforced for new registrations.
CPF uses a two-pass modulo-11 checksum. For the first check digit, each of the nine base digits is multiplied by weights 10 through 2, the sum is computed modulo 11, and the result maps to the check digit (0 or 1 becomes 0; otherwise 11 minus the result). The second check digit uses the same process but includes the first check digit in the input, with weights 11 through 2. This double-verification makes accidental CPF collisions extremely rare and deliberate forgery detectable.
Any application targeting Brazilian users — e-commerce, banking, insurance, or healthcare — will encounter CPF as a mandatory field. Brazilian developers commonly use fake CPF generators during development because real CPFs contain sensitive taxpayer information protected under Brazil's LGPD (Lei Geral de Proteção de Dados). A structurally valid fake CPF passes client-side validation libraries and backend middleware, enabling thorough end-to-end testing without legal or privacy risks.
Brazil's Pix instant payment system, the gov.br identity platform, and the SERPRO government data services all use CPF as the primary citizen identifier. E-commerce platforms must collect and validate CPF for NF-e (electronic tax invoice) issuance. International companies entering the Brazilian market — whether in fintech, retail, or healthcare — must implement CPF validation correctly from day one. A fake CPF generator that produces valid checksums is an essential tool for pre-launch testing and regulatory compliance validation.