CPF generator and validator

Generate valid CPFs to use in tests or check whether a CPF is valid.

What do you want to do?

A valid CPF is generated when the page opens. Choose the quantity and the format, or click "Generate CPF" to create another one.

Options

How it works

  • The CPF is generated on the server and is not stored anywhere.
  • The number follows the rules of Brazil's Federal Revenue Service (Receita Federal).
  • The check digits are calculated correctly.
  • The number is for testing only and does not belong to any real person.
  • The latest generated values are listed below the button until you leave the page.

How to use the API

You can integrate the CPF generator into your app through our REST API.

Endpoint

GET /api/generators/cpf

Query parameters

quantity
Optional. From 1 to 50. When set, the response has the "cpfs" list instead of "cpf".
formatted
Optional. "false" generates digits only. Default: "true".

curl example

curl "https://devtools.vmotta.dev/api/generators/cpf?quantity=2&formatted=false"

Response

{
  "cpfs": [
    "52998224725",
    "11144477735"
  ]
}