CNPJ: the company ID that is also a tax number
The CNPJ (Cadastro Nacional da Pessoa Jurídica) identifies a business in almost everything it does, from issuing a nota fiscal to paying taxes. Every branch has its own. Since July 2026 it can also contain letters.
In one sentence
Think of the CNPJ as company ID + VAT number
In the United Kingdom and many other countries, the company number is just the legal registration; to deal with tax, the company also needs a VAT number. In Brazil the CNPJ does both jobs: it is the legal registration and the federal tax ID.
It is not the only registration a company needs, though. Who sells what decides the rest:
Federal
CNPJ
Every legal entity and each of its branches. Federal taxes, NF-e, banks, contracts.
State
IE · Inscrição Estadual
For companies that sell goods: ICMS is paid under the state registration.
Municipal
IM · Inscrição Municipal
For companies that provide services: ISS is paid under the city registration.
People
CPF
The tax ID of a natural person: employees, individual suppliers, consumers.
Head office and branches
How CNPJs of a head office and its branches work
Branches share the head office’s 8-character root and get their own order number: 0001 is usually the head office, then 0002, 0003 and so on. In SAP each legal entity is a company code and each CNPJ is a business place.
Business places are mandatory for tax purposes: notas fiscais, tax books and SPED files are all kept per business place.
CNPJ coding
Fourteen characters, three blocks
23.456.789
Block 1 · the root
The first 8 characters identify the company. All its branches share them.
0001
Block 2 · the order
The next 4 identify the establishment: 0001 the head office, 0002 branch one, 0003 branch two and so on.
95
Block 3 · check digits
The last 2 are calculated by the government from the other 12 with a modulo-11 algorithm. They are always numbers.
New since July 2026
The alphanumeric CNPJ
Brazil was running out of numeric CNPJs, so the Receita Federal started issuing alphanumeric ones on 31 July 2026 (Normative Instruction RFB 2.229/2024). The format keeps 14 characters: the root and the order (the first 12) can now hold capital letters as well as digits, and the 2 check digits stay numeric. For the calculation, each letter takes its character code minus 48 (A = 17, B = 18…).
Existing CNPJs don’t change, numeric ones are still issued while they last, and both formats are valid side by side. Any system that treats the CNPJ as a number has to change.
Checking a CNPJ
Is this company really registered?
The Receita Federal’s public page shows whether a company is registered and active, and issues its registration card. The page is in Portuguese.
Type the CNPJ in the field “CNPJ”.
Solve the captcha to prove you are a person.
Click “Consultar” to see the card.
Official page: solucoes.receita.fazenda.gov.br
Reading the card
The CNPJ registration card, field by field
This is the card the lookup produces (Comprovante de Inscrição e de Situação Cadastral). The data is left out here; the numbers match the table.
| # | On the card | In English |
|---|---|---|
| 1 | Número de inscrição | CNPJ number |
| 2 | Matriz / Filial | Head office or branch |
| 3 | Data de abertura | Opening date |
| 4 | Nome empresarial | Legal name |
| 5 | Título do estabelecimento (nome de fantasia) | Trade name |
| 6 | Porte | Company size (ME, EPP or other) |
| 7 | Código e descrição da atividade econômica principal | Main economic activity (CNAE) |
| 8 | Código e descrição das atividades econômicas secundárias | Secondary activities (CNAE) |
| 9 | Código e descrição da natureza jurídica | Legal form, e.g. 206-2 limited company |
| 10 | Logradouro | Street |
| 11 | Número | Street number |
| 12 | Complemento | Address complement (suite, floor, unit) |
| 13 | CEP | Postal code |
| 14 | Bairro / Distrito | Neighbourhood or district |
| 15 | Município | Municipality (city) |
| 16 | UF | State |
| 17 | Endereço eletrônico | |
| 18 | Telefone | Phone number |
| 19 | Ente federativo responsável (EFR) | Responsible federative entity; filled only for public bodies |
| 20 | Situação cadastral | Registration status: active, suspended, unfit, closed or null |
| 21 | Data da situação cadastral | Date of the status |
| 22 | Motivo de situação cadastral | Reason for the status |
| 23 | Situação especial | Special status, e.g. judicial recovery |
| 24 | Data da situação especial | Date of the special status |
SAP configuration
Where the CNPJ goes in SAP
1 · The company code
Transaction OBY6: open the Brazilian company code and click Additional Data. Enter the 8-character root and the 4-character order of the head office.
You don’t enter the 2 check digits: SAP calculates them.
2 · The business places
Customizing (SPRO): Cross-Application Components › General Application Functions › Nota Fiscal › CNPJ Business Places › Define Business Places.
Create one business place per CNPJ order. Branches are sequential: 0002, 0003, 0004 and so on. Then assign each plant to its business place, so goods movements know which CNPJ they belong to.
3 · No duplicate business partners
Transaction BUPA_TAXNUMTYPE: switch on the duplicate check for category BR1 (CNPJ). SAP then warns when someone creates a business partner with a CNPJ that already exists.
You can switch it on for BR2 (CPF, natural persons) too, and use it to check state and municipal tax numbers more accurately.
Screens redrawn from SAP S/4HANA. Paths, labels and screens vary with the release.
Alphanumeric CNPJ in SAP
What to check before the first lettered CNPJ arrives
Apply SAP’s notes for the alphanumeric CNPJ: validation, check digits, NF-e and reports. Search “CNPJ alfanumérico” in SAP for Me.
Look for numeric checks, NUMC fields, number conversions and sorting that assume digits only.
Bank files, EDI, the tax engine, supplier portals and every system that receives a CNPJ from SAP.
Templates and spreadsheets that strip letters or leading zeros from the CNPJ.