Alphanumeric CNPJ
The first 12 positions can combine A–Z and 0–9; the final 2 verification digits remain numeric.
Generate valid CPF and CNPJ numbers with or without mask, select issuing state or branch type, generate batches up to 50 documents, and validate existing numbers with step-by-step audit.
Choose type and generate a sample or batch.
Consistent CPF for testing.
The first 12 positions can combine A–Z and 0–9; the final 2 verification digits remain numeric.
Structure, allowed characters, repeated trivial sequences, and Modulo 11 verification digits.
Existence, ownership, tax standing, or any real government records.
Fill in the values, paste your text, or upload the file this tool works with.
Most tools update live as you type; a few use a single button. Either way, the result appears right on this page.
Copy, download, or share what the tool produces — you're always in control of the output.
A CPF, CNPJ, and alphanumeric CNPJ generator and validator for software testing. Generate valid numbers with or without a mask, choose a fiscal region or branch type, generate batches of up to 50 documents, and validate any document with a full mathematical audit trail.
Generate mathematically valid CPF and CNPJ numbers for testing — including the new alphanumeric CNPJ format —, or validate any existing document with a full step-by-step Modulo 11 breakdown.
CPF and CNPJ both use two check digits computed the same way: every position in the document is multiplied by a weight, the products are summed, and the remainder of dividing by 11 gives the expected digit. The Validation tab shows every weight, every product, and the final sum, so you can manually spot exactly where a mistyped document diverges from what's expected.
weight = position + 1 (counted from the end backward)weight = (position % 8) + 2, cyclicSince Receita Federal's update, a CNPJ can contain letters as well as digits in its first 12 characters (the two check digits stay numeric). Each letter is turned into a numeric value by the official rule — its ASCII code minus 48 — before entering the same weighted-sum formula used for a traditional CNPJ. Pick 'Alphanumeric CNPJ' in the generator to create examples already in the new format.
'A' has ASCII code 65, so its numeric value in the sum is 65 − 48 = 17.
charCode('A') - 48 = 17In a CPF, the 9th digit indicates the fiscal region where the document was issued — for example, 8 for São Paulo or 0 for Rio Grande do Sul. Choosing a region in the generator creates documents consistent with that criterion, useful for testing rules that depend on a CPF's origin.
In a CNPJ, digits 9 through 12 indicate the establishment's sequence number: 0001 for headquarters, and following numbers for branches. The generator lets you fix it to headquarters, a branch (a random number other than 0001), or leave it random between the two.
Generate up to 50 documents at once, all mathematically valid, and copy the list or download it as a .txt file — useful for populating test spreadsheets, QA data sets, or automated test fixtures without typing each document by hand.
Sequences like 111.111.111-11 or 00.000.000/0000-00 could even produce mathematically consistent check digits in some cases, but Receita Federal's official rules explicitly invalidate any document with every digit repeated, as an extra safeguard against obvious fraud. The validator rejects these patterns even when the check-digit math works out.
Every generation and validation runs in your browser via JavaScript — no typed or generated document is sent to a server. Generated documents are mathematically valid but fictitious: they don't belong to any real person or company and aren't checked against any database.
It's the new CNPJ format defined by Receita Federal, which allows letters in the first 12 positions (the 2 check digits stay numeric). This tool already generates and validates documents in that new format, alongside the traditional numbers-only CNPJ.
No. They're created algorithmically in your browser purely to satisfy the mathematical validation rule — the tool doesn't query or store any real registry.
Receita Federal's official rules explicitly invalidate any CPF or CNPJ with every digit identical, regardless of what the Modulo 11 math would otherwise produce, as an extra safeguard against obvious fraud.
Each character (digit or letter) is converted to a value using its ASCII code minus 48 — for example, '0' is worth 0 and 'A' is worth 17 — and that value enters the same weighted sum used to calculate a traditional CNPJ's check digits.
Yes — choose the state or state group in the region selector before generating. The resulting CPF's 9th digit will reflect the region you chose.
No. Use them only for software testing and development in controlled environments — using fictitious data to pass as a real document in commercial registrations or official systems can violate terms of use and applicable law.
Generate standards-friendly UUID values locally.
Format JSON, convert YAML, and clean up XML in the browser.
Create QR codes and read QR images locally.
Encode and decode text using Base64 locally.
Encode and decode URLs in separate tabs, with batch and recursive options.
Convert Unix timestamps to dates, and back.
Encode and decode HTML entities safely.
Test regular expressions and preview replacements.
Decode JWT header and payload locally.
Validate cron syntax and preview next run times.