945.970.446-80CPF and CNPJ Generator for Software Testing
Generate mathematically valid Brazilian CPF and CNPJ numbers for QA, automated tests, form validation and development environments. Choose formatted or unformatted output and create multiple test values when needed.
Generated numbers only satisfy check-digit rules. They do not represent verified people or companies and must not be used as real identity or registration data.
Instructions
How to generate a CPF or CNPJ
Select the document type, choose the output format and the desired quantity, then click Generate. The numbers are generated automatically whenever you change any option. All generated documents are mathematically valid — the check digits are calculated following the official algorithms of the Brazilian Federal Revenue Service (Receita Federal).
Output formats
Formatted displays the CPF in the 000.000.000-00 pattern and the CNPJ in the 00.000.000/0001-00 pattern, as used in documents and systems. Unformatted returns only the characters without punctuation, useful for populating databases or fields that do not accept a mask.
About CPF and CNPJ
CPF — Individual Taxpayer Registry
The CPF is made up of 11 digits: 9 base digits followed by 2 check digits calculated with Modulo 11. The first check digit is obtained from the first 9 digits and the second from the first 10. This mechanism allows typing errors to be detected and prevents any random 11-digit number from being considered a valid CPF.
CNPJ — National Registry of Legal Entities
The CNPJ is made up of 14 digits: 8 digits identify the company (root), 4 digits identify the branch (usually 0001 for the headquarters) and the last 2 are check digits calculated with Modulo 11. The generated CNPJs use 0001 as the branch number, representing the company's headquarters.
Alphanumeric CNPJ — new format
Starting in July 2026, the Receita Federal will begin issuing alphanumeric CNPJs in accordance with RFB Normative Instruction No. 2,229/2024. The first 8 characters of the root can contain uppercase letters (A–Z) as well as digits (0–9), while the branch code (0001) and the two check digits remain numeric. The check digit calculation uses the same Modulo 11, with the numeric value of each letter defined by its ASCII code minus 55 (A = 10, B = 11 … Z = 35).
Use for testing
This tool is intended exclusively for software development and testing purposes. The generated documents are mathematically valid but do not belong to any real individual or company. Never use generated CPFs or CNPJs for fraudulent or illegal purposes.