How to generate CPF for system testing

When developing a registration system, e-commerce, ERP, or any application that requires CPF, using real documents in a test environment is not a good idea. In addition to privacy concerns, this can clutter the database with information that looks "real".

This is where the CPF generator for testing comes in: it creates numbers that are valid from the point of view of check digit calculation, but are not linked to real people.

Why use test CPFs?

  • Avoid exposing customer personal data.
  • Safely simulate bulk registrations.
  • Test form validations.
  • Validate integrations with APIs that require CPF.

How to generate CPF for testing using Utilo

  1. Access the CPF/CNPJ Generator tool on Utilo.
  2. Select the CPF option.
  3. Click Generate.
  4. Use the Copy button to send the value to your test system.

All generated CPFs follow the official check digit calculation rules, which ensures compatibility with system and API validations. However, they should not be used in real person registrations.

Best practices when using test CPFs

  • Use separate environments for testing and production.
  • Never mix test CPFs with real data in a production environment.
  • Clearly identify test records in the database.

If you work with development, QA, or validation, having a CPF generator always at hand is practically mandatory – and Utilo makes this easy for you.