Getting started

Alphanumeric CNPJ

The new CNPJ format, with letters in the first 12 positions.

Brazil’s federal revenue service started issuing alphanumeric CNPJs for new registrations in July 2026. Existing numeric CNPJs remain valid, unchanged.

Structure

PositionsContent
1 to 8Root: letters A-Z and numbers
9 to 12Order (branch): letters and numbers
13 and 14Check digits: always numbers

Check digit calculation

It is the usual modulo 11, except each character is worth its ASCII code minus 48. So 0-9 stay 0 to 9 and A-Z are worth 17 to 42.

value("7") = 55 - 48 = 7
value("A") = 65 - 48 = 17
value("Z") = 90 - 48 = 42

1st digit weights: 5 4 3 2 9 8 7 6 5 4 3 2
2nd digit weights: 6 5 4 3 2 9 8 7 6 5 4 3 2

rest = sum % 11
digit = rest < 2 ? 0 : 11 - rest

Valid example: 00000000E08G12.