ToolerCat / CPF & CNPJ Generator

CPF & CNPJ Generator

Valid test CPF and CNPJ for forms and databases — plus a bulk validator.

How CPF and CNPJ check digits work

CPF (individual taxpayer number) has 9 base digits and 2 check digits, each calculated with modulo 11 and descending weights (10…2, then 11…2). A remainder below 2 gives 0, otherwise 11 − remainder. Numbers with all-equal digits (111.111.111-11) are invalid.

CNPJ (company number) has 8 base characters, a 4-character branch number (0001 is the head office) and 2 check digits with weights 5…2, 9…2 and 6…2, 9…2. Since July 2026 the Receita Federal also issues alphanumeric CNPJ: the first 12 characters may contain letters, each character counts as its ASCII code minus 48 (A = 17), and the check digits stay numeric. Existing numeric CNPJ remain valid, so systems must accept both.

QA checklist

FAQ

Do these numbers belong to real people?

They are random numbers that pass the check-digit rules; one might coincide with a real registration. Use them only for testing.

More about this tool

Generate valid Brazilian CPF and CNPJ numbers with correct check digits, formatted or as plain digits, for testing forms and APIs.

They are synthetic and not registered to anyone; use them only in test environments for Brazilian checkout, KYC and invoicing flows.