CPF/CNPJ Generator/Validator

Generates and validates CPF/CNPJ, including the new alphanumeric format, with exact check digits.

Document type

Quantity

02505627150

13187385397

62855358256

93096970246

34393506065

What CPF is

CPF (Cadastro de Pessoas Físicas) is Brazil's individual taxpayer registry — 11 digits, always numeric, ending in two check digits computed from the first 9 using the modulo-11 algorithm. The 2026 CNPJ change doesn't affect CPF: the calculation stays exactly the same as always.

What CNPJ is

CNPJ (Cadastro Nacional da Pessoa Jurídica) identifies a company (or one of its branches) with Brazil's Federal Revenue Service (Receita Federal) — 14 characters in the XX.XXX.XXX/XXXX-XX format: 8 for the root (identifies the company), 4 for the order (headquarters or branch — 0001 is usually the headquarters) and 2 always-numeric check digits, computed with modulo 11 over the first 12 characters.

The new alphanumeric CNPJ (2026)

Starting July 2026, Brazil's Federal Revenue Service can issue CNPJs with uppercase letters (A-Z) in the first 12 characters — root and order, independently of each other — while the 2 check digits stay always numeric (Normative Instruction RFB 2.119/2022, amended by IN RFB 2.229/2024). The reason is simple: expand how many CNPJs are possible. Every numeric CNPJ already issued stays valid forever, with no action needed — both formats coexist indefinitely, and the letters are drawn with no meaning at all (they don't encode state, legal nature, or anything beyond identifying the company).

How the check digit is calculated

Both formats share the same principle: modulo 11 over the base characters, with weights from 2 to 9 assigned right to left. The alphanumeric CNPJ's only difference is the value of each character — instead of the raw digit, it uses the character's ASCII code minus 48 (digits '0'-'9' still count as 0-9; letters 'A'-'Z' count as 17-42) — which makes today's fully numeric CNPJ just a special case of this same calculation, never a separate algorithm. CPF uses a weight scheme that never wraps (10 down to 2), unlike CNPJ, whose weight resets to 2 after eight positions.

Frequently asked questions

No. They're mathematically valid sequences (correct check digits) but randomly drawn — they don't correspond to any real person or company. They're only meant for testing systems, forms, and validations, never for use in real documents or records.

Nothing. Every numeric CNPJ already issued stays exactly the same, forever — Brazil's Federal Revenue Service confirms no update is needed. The alphanumeric format applies only to new registrations, starting July 2026, rolled out progressively.

No. They're drawn with no logic built in — Brazil's Federal Revenue Service itself confirms they don't encode state, legal nature, or any other attribute.

The 2026 change is specific to CNPJ (expanding how many companies can be numbered) — CPF wasn't changed and stays exclusively numeric.

CPF sequences with every digit the same pass the modulo-11 math — a known property of the algorithm — but were never actually issued. By convention (not an official rule), this tool rejects all 10 sequences of that kind, the same practice any serious CPF validator follows.

No. Validate mode accepts input with or without a mask, uppercase or lowercase — the document type (CPF or CNPJ) and the CNPJ format are detected automatically.

Only at the moment the CNPJ is created. Brazil's Federal Revenue Service confirms that link isn't permanent — a branch can later become the company's main headquarters, even while keeping an order number other than 0001.

The "Always headquarters (0001)" option only fixes the order — the root (first 8 characters) is still drawn normally according to the chosen format, which can include letters even with the order fixed at 0001.