New 2026 format

Alphanumeric CNPJ Generator

Generate CNPJs in the new alphanumeric format from the Brazilian Federal Revenue, effective from July 2026. Check digits are calculated with the updated algorithm.

What is the Alphanumeric CNPJ?

The Alphanumeric CNPJ is the new legal entity registration format approved by the Brazilian Federal Revenue through Normative Instruction RFB No. 2,229/2024. Unlike the traditional format that uses only numbers, the new CNPJ can contain both letters (A-Z) and numbers (0-9) in the first 12 positions.

This change was motivated by the potential exhaustion of available numeric combinations in the current format. By including letters, the number of possible combinations grows from a few million to nearly one trillion unique identifiers, ensuring the long-term sustainability of the system.

The last two digits (positions 13 and 14) remain exclusively numeric, as they are the check digits calculated by the modulo 11 algorithm adapted for alphanumeric characters.

When does the Alphanumeric CNPJ take effect?

The new alphanumeric CNPJ format is scheduled to take effect from July 2026, as established by Normative Instruction RFB No. 2,229, published in October 2024. Implementation will be gradual, starting with large enterprises.

It is important to note that all existing CNPJs in the traditional numeric format will remain permanently valid. There will be no migration or conversion of current registrations β€” both formats will coexist indefinitely in the Federal Revenue system.

Companies and developers should prepare their systems to accept the new format by updating form validations and integrations that assume the CNPJ consists only of numbers.

Why is the Federal Revenue changing the CNPJ?

The main motivation for the change is the risk of exhausting available combinations in the current numeric format. With 14 numeric digits (2 being check digits), the number of possible unique CNPJs is limited to approximately 100 million combinations.

Considering that Brazil already has over 58 million registered CNPJs (including inactive ones), and new companies are opened daily, the exhaustion of numeric combinations would become a problem in the medium term.

By including letters (A-Z) in the first 12 positions, the combination space grows exponentially to nearly one trillion possible identifiers, eliminating any risk of exhaustion in the foreseeable future.

Differences between traditional and alphanumeric CNPJ

The main difference is in the allowed characters: the traditional CNPJ uses only digits (0-9), while the alphanumeric format accepts uppercase letters (A-Z) and digits (0-9) in positions 1 to 12. In both formats, the last two characters (check digits) are always numeric.

The display format remains the same: XX.XXX.XXX/XXXX-XX, with dots, slash and hyphen in the same positions. The only visual difference is that some positions may contain letters instead of numbers.

The validation algorithm is also essentially the same (modulo 11), but with an adaptation: letters receive specific numeric values for calculation. The letter A equals 17, B equals 18, and so on up to Z which equals 42. Numbers keep their face value (0-9).

How does the check digit calculation work for Alphanumeric CNPJ?

The calculation uses the same modulo 11 algorithm as the traditional CNPJ, with the difference that letters are converted to numeric values before multiplication by the weights. The conversion follows the rule: A=17, B=18, C=19, ..., Z=42. Digits keep their normal value (0=0, 1=1, ..., 9=9).

For the first check digit, each of the first 12 characters has its value multiplied by the weight sequence [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2]. The sum of products is divided by 11 β€” if the remainder is less than 2, the digit is 0; otherwise, it is 11 minus the remainder.

The second digit is calculated including the first check digit, using the weights [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2]. This approach ensures backward compatibility with traditional CNPJs, since digits retain their original values.

Frequently Asked Questions

Is the generated alphanumeric CNPJ real?+
No. Generated CNPJs have valid check digits according to the new algorithm, but they are not real registrations with the Federal Revenue. They are fictitious numbers for exclusive use in testing and development.
Will traditional CNPJs stop working?+
No. All existing CNPJs in the numeric format will remain permanently valid. Both formats will coexist indefinitely.
How should my system prepare for the alphanumeric CNPJ?+
Update form fields to accept letters in addition to numbers, review regex validations, and adapt check digit validation functions to consider the letter mapping (A=17...Z=42).
What is the difference in check digit calculation?+
The base algorithm is the same (modulo 11). The difference is that letters are converted to numeric values (A=17, B=18, ..., Z=42) before calculation, while digits keep their face value.
Does the display format change?+
The masked format remains the same: XX.XXX.XXX/XXXX-XX. The difference is that positions can contain uppercase letters in addition to numbers.