CNPJ toolsFree
Alphanumeric CNPJ Validator
Validates a CNPJ in the current numeric format or the new alphanumeric one (2026). Checks the check digits step by step, detects the format and splits root, order and DV. Runs 100% in your browser, no sign-up.
- No sign-up
- Runs in your browser
How it works
How to validate a CNPJ in the new alphanumeric format
The new CNPJ keeps the same 14 positions and the familiar XX.XXX.XXX/XXXX-XX mask. What changes is that the first 12 positions (the 8-character root and the 4-character order) now accept letters and numbers, while the 2 check digits at the end stay strictly numeric. Validating means confirming that those 2 digits match what the algorithm computes from the other 12 positions.
The calculation is the classic CNPJ modulo 11, with a single adjustment to accommodate letters: the value of each character becomes its ASCII code minus 48. In practice, digits 0 to 9 still count as 0 to 9 and letters are A=17, B=18, C=19 and so on up to Z=42. Each value is multiplied by a weight from 2 to 9, assigned right to left, and the products are summed.
Take the official example 12.ABC.345/01DE. Applying the weights to the base and summing, the first check digit is 3; repeating the math with that 3 included, the second is 5, giving 12.ABC.345/01DE-35. That is exactly the step-by-step the tool shows when you open 'Show the check-digit calculation', handy for checking a validation routine in your own system.
FAQ
Frequently asked questions
How do I validate an alphanumeric CNPJ?
Paste the number above. The tool strips punctuation, separates the 12-position base (root + order) from the 2 check digits, recalculates them with modulo 11 and compares them with the ones you entered. If they match, the CNPJ is valid. It works for both the current numeric format and the new alphanumeric one.
Do the CNPJ check digits change in the alphanumeric format?
The math is the same modulo 11 as always, with one difference: each character is now worth its ASCII code minus 48 (digits 0–9 stay 0–9 and letters are A=17, B=18, up to Z=42). The two check digits themselves remain numeric.
How are the check digits of the new CNPJ calculated?
Each of the first 12 positions is turned into a number, multiplied by a weight from 2 to 9 (right to left) and summed. The remainder of the sum divided by 11 sets the digit: if it is below 2, the digit is 0; otherwise it is 11 minus the remainder. The second digit repeats the math including the first. Open 'Show the calculation' to follow it step by step.
Does the validator work with the old numeric CNPJ?
Yes. The 14-digit numeric CNPJ is a special case of the alphanumeric algorithm, so the same tool validates both. Existing CNPJs stay valid and do not change; the alphanumeric format only applies to new registrations from July 2026.
Will current CNPJs change to alphanumeric?
No. According to the Brazilian tax authority (Receita Federal), anyone who already has a CNPJ keeps the numeric number with no change. The alphanumeric format will be assigned only to new registrations starting in July 2026, coexisting with current numbers.
Blog
Articles on this topic
Guide
Alphanumeric CNPJ: The New CNPJ Format in 2026
From July 2026, new companies receive a CNPJ with letters and numbers. Understand what changes, why the alphanumeric format was created, how the structure and check digit work, and what to review in your systems before the switch.
11 min read
Guide
How to Validate and Calculate the CNPJ Check Digit
The technical guide to the CNPJ check digit in the alphanumeric format: the modulo 11 algorithm, the character conversion table (ASCII − 48), a worked example step by step and ready-to-use JavaScript to validate numeric and alphanumeric numbers.
9 min read