Alphanumeric CNPJ Validator
Validate any CNPJ — the current numeric one and the new alphanumeric format (2026) — with step-by-step check-digit verification, format detection and a breakdown of root, order and DV. Runs 100% in your browser, no sign-up.
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.
Learn more
Articles to put this tool to work
CNPJ Alfanumérico: o Novo Formato do CNPJ em 2026
A partir de julho de 2026, novas empresas recebem um CNPJ com letras e números. Entenda o que muda, por que o formato alfanumérico foi criado, como fica a estrutura e o dígito verificador, e o que revisar nos seus sistemas antes da virada.
Como Validar e Calcular o Dígito Verificador do CNPJ
O guia técnico do dígito verificador do CNPJ no formato alfanumérico: o algoritmo do módulo 11, a tabela de conversão dos caracteres (ASCII − 48), um exemplo resolvido passo a passo e código JavaScript pronto para validar numérico e alfanumérico.
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.
