CNPJ Generator
Generate valid CNPJ numbers for testing and development.
For Testing Only
These CNPJs are randomly generated and are valid only mathematically. They do not correspond to real companies.
API Endpoint
GET /api/tools/generate/cnpj?formatted=true&count=10
Parameters: formatted (bool, default: true), count (1-100, default: 1)
Why Use a CNPJ Generator?
A CNPJ generator is an essential tool for developers who need to test systems that validate or process CNPJ numbers. Instead of using real company data, you can generate random but mathematically valid CNPJs.
Common Use Cases
- Form Testing: Test registration and checkout forms with valid CNPJs
- Unit Tests: Generate test data for automated test suites
- Integration Testing: Test API integrations that require CNPJ validation
- Database Seeding: Populate development databases with valid data
- Demo Environments: Create realistic demo data without using real companies
How It Works
The generator creates random 12-digit base numbers and then calculates the two check digits using the official algorithm. This ensures that every generated CNPJ passes mathematical validation.
Are These Real CNPJs?
No. The generated CNPJs are purely random and do not correspond to any real companies. They are only mathematically valid and should only be used for testing purposes.