Skip to main content
Skip to main content

Alphanumeric CNPJ Validator

Validate alphanumeric CNPJs in the new Federal Revenue format. For QA.

About the Alphanumeric CNPJ Validator

This tool validates the new alphanumeric CNPJ format established by IN RFB No. 2,119/2022. Starting July 2026, the Federal Revenue may issue CNPJs containing letters (A-Z) and numbers (0-9), increasing combination possibilities.

The verification digit calculation algorithm is similar to the traditional CNPJ, but adapted to work with alphanumeric characters. This tool is essential for testing your system's compatibility with the new standard.

Anatomy & Structure of Alphanumeric CNPJ

The upcoming Alphanumeric CNPJ features 14 positions formatted as XX.XXX.XXX/XXXX-DD:

PositionFieldLengthMeaning & RuleExample
1 to 8Alphanumeric Root8 charsLetters A-Z and digits 0-9 identifying the entity12AB56CD
9 to 12Establishment Code4 charsAlphanumeric establishment order (0001 for main headquarters)0001
13 & 14Numeric Check Digits2 digitsStrictly numeric check digits computed via ASCII-based Modulo 1142

Official Alphanumeric CNPJ Algorithm (IN RFB 2,229/2024)

Each character maps to a decimal integer calculated as ASCII code minus 48:

Val(c) = ASCII(c) - 48; CD1 = (Sum1 % 11 < 2 ? 0 : 11 - Rem1); CD2 = (Sum2 % 11 < 2 ? 0 : 11 - Rem2)
  1. 1. Convert first 12 characters: Value = ASCII - 48 (digits '0'-'9' equal 0-9; letters 'A'-'Z' equal 17-42).
  2. 2. Multiply values by cyclic weights [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2].
  3. 3. If remainder modulo 11 < 2, CD1 is 0; else CD1 = 11 - remainder.
  4. 4. For CD2, multiply by weights [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2] and CD1 by 2.
  5. 5. If remainder < 2, CD2 is 0; else CD2 = 11 - remainder.
  6. 6. Check digits 13 and 14 are strictly numeric 0 to 9.

Frequently Asked Questions (FAQ)

When does the alphanumeric CNPJ come into effect?
The Federal Revenue may start issuing alphanumeric CNPJs from July 2026. It is crucial that systems are prepared before this date.
Will old numeric CNPJs remain valid?
Yes. All existing numeric CNPJs will remain valid. The new format applies only to new CNPJs issued after the implementation date.
Is the validation secure?
Yes. All validation happens in your browser. No data is sent to our servers.