{"inline_business":{"brazil-cnpj-validator-generator":{"validate_title":"Check a CNPJ","input_label":"CNPJ (14 characters)","input_hint":"With or without punctuation: 11.222.333/0001-81, 11222333000181 or 12.ABC.345/01DE-35.","empty":"Enter a CNPJ to start the check.","valid":"Valid CNPJ (check digits are correct)","invalid":"Invalid CNPJ","formatted":"Formatted:","correct_form":"With the correct check digits:","kind_numeric":"Numeric CNPJ","kind_alpha":"Alphanumeric CNPJ (2026 format)","head_office":"head office (order 0001)","branch":"establishment no. {{order}}","reason_chars":"Character \"{{ch}}\" at position {{pos}} is not allowed: only digits and letters A to Z are accepted.","reason_dvchars":"The last two characters are the check digits: they are always numeric, even in an alphanumeric CNPJ.","reason_length":"Wrong length: {{n}} characters entered, 14 expected.","reason_repeated":"All digits are identical (like 00.000.000/0000-00): this number is not issued.","reason_dv":"Wrong check digits: {{expected}} expected, {{entered}} entered.","rule":"Rule: each character is worth its ASCII code − 48 (digits unchanged, A = 17, B = 18…); weights 5,4,3,2,9…2 then 6,5,4,3,2,9…2; remainder mod 11 below 2 → 0, otherwise 11 − remainder.","generate_title":"Generate test CNPJs","alpha_label":"Alphanumeric format (letters in the first 12 positions)","head_office_label":"Head office (order 0001)","punct_label":"With punctuation","count_label":"How many","generate_btn":"Generate","generator_warning":"Fictitious numbers for testing a form or a system: a valid number is not necessarily assigned to a company.","note":"The check only proves the number is consistent. Whether a company exists, and its status, are shown on the Receita Federal's comprovante de inscrição in Brazil. Numeric CNPJs already issued remain valid."}},"docs_business":{"tools":{"brazil-cnpj-validator-generator":{"content":{"title":"How CNPJ check digits are calculated in Brazil","intro":"In Brazil, the CNPJ has 14 positions: an 8-character root, a 4-character establishment number (0001 for the head office) and 2 modulo 11 check digits computed with weights 5, 4, 3, 2, 9 down to 2, then 6, 5, 4, 3, 2, 9 down to 2. Since July 2026 the first 12 positions may contain letters, worth their ASCII code minus 48 (A = 17); the check digits stay numeric.","details":"

The calculation

Each character of the first 12 positions is converted: a digit keeps its value, a letter is worth its ASCII code − 48 (A = 17, B = 18, C = 19… Z = 42). First check digit: sum of the values × 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2; when the remainder of the sum divided by 11 is 0 or 1 the digit is 0, otherwise 11 − remainder. The second covers the first 13 positions with weights 6, 5, 4, 3, 2, 9 down to 2.

Worked examples

The alphanumeric CNPJ

Normative Instruction RFB No. 2,229/2024 of 15 October 2024 created this format for new registrations from July 2026; the Receita Federal issued the first one, 00.000.000/E08G-12, on 31 July 2026. Numeric CNPJs already issued do not change, and the tool accepts both formats.

Generator and limits

The generator produces fictitious numbers for testing a form or a system (head office 0001 or a random establishment). A valid number is not necessarily assigned.

Sources and dates: Receita Federal, Alphanumeric CNPJ (IN RFB 2,229/2024); Serpro calculation rule (ASCII − 48 conversion, example 12.ABC.345/01DE-35) (checked on 15/10/2026).

"},"faqs":[{"question":"Since when can a CNPJ contain letters?","answer":"Normative Instruction RFB No. 2,229/2024 introduced the alphanumeric CNPJ for new registrations from July 2026, and the Receita Federal issued the first one on 31 July 2026. Existing numeric CNPJs remain valid and are not renumbered."},{"question":"How are the check digits of a CNPJ with letters calculated?","answer":"Convert each character to its ASCII code minus 48: digits keep their value, A is 17, B is 18 and so on. Then apply the usual modulo 11 with weights 5, 4, 3, 2, 9 down to 2, then 6, 5, 4, 3, 2, 9 down to 2. For 12.ABC.345/01DE the result is 35."},{"question":"What does 0001 mean in a CNPJ?","answer":"Positions 9 to 12 number the establishment: 0001 is usually the head office (matriz), and 0002, 0003… are branches. The first 8 positions, the root, are shared by every establishment of the company."},{"question":"Can a generated CNPJ be used on an invoice?","answer":"No. The generator produces arithmetically valid numbers to test a form or software; they match no registered company, or a real one by chance. An invoice requires the issuer's real CNPJ."}]}}}}