Free online tool

CPF Generator

Generate valid Brazilian CPF numbers for software testing, with or without punctuation.

Generate CPF

Create valid fictional data for software testing.

Generated result

Numbers are generated locally in your browser and are not checked against the Brazilian Federal Revenue database.

Prefer Portuguese? Use o gerador de CPF em português.

How to use the CPF generator

Decide whether to include dots and a hyphen, then select Generate new. Changing the punctuation option updates the displayed CPF immediately.

Generation happens entirely in your browser. No number is sent, stored, or checked by an external service.

What is a fictional CPF used for?

Generated CPFs help developers test forms, input masks, validation rules, imports, APIs, and staging environments without using real personal data. They are also useful in automated test fixtures.

A mathematically valid CPF does not necessarily identify a person and must not be used for real registrations, fraud, or impersonation.

How are CPF check digits calculated?

A Brazilian CPF contains nine base digits followed by two check digits. This tool calculates both check digits with the modulo 11 rule so applications can test the document's expected structure.

Formatted and unformatted CPF

Use a value such as 529.982.247-25 to test masked fields. Disable punctuation to get the 11-digit representation commonly used in APIs, databases, and data files.

Frequently asked questions

Does a generated CPF belong to a real person?

Not necessarily. The tool creates a fictional sequence with mathematically valid check digits without querying the Brazilian Federal Revenue database.

Can I use generated CPFs for testing?

Yes. They are intended for development, staging environments, form masks, validators, APIs, and test fixtures.

Can I generate a CPF without punctuation?

Yes. Disable punctuation to receive only the 11 digits.

Are generated CPFs stored?

No. Generation happens locally in your browser, and CosmoTools neither sends nor stores the results.