1. Home
  2. Brazil Localization

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.

COMPANY CODE BR01Company A · root 23.456.789COMPANY CODE BR02Company B · root 98.765.432BUSINESS PLACE0001Head officeBUSINESS PLACE0002Branch 1BUSINESS PLACE0003Branch 2BUSINESS PLACE0001Head office2 company codes4 business places
Required

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.

1

Type the CNPJ in the field “CNPJ”.

2

Solve the captcha to prove you are a person.

3

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 cardIn English
1Número de inscriçãoCNPJ number
2Matriz / FilialHead office or branch
3Data de aberturaOpening date
4Nome empresarialLegal name
5Título do estabelecimento (nome de fantasia)Trade name
6PorteCompany size (ME, EPP or other)
7Código e descrição da atividade econômica principalMain economic activity (CNAE)
8Código e descrição das atividades econômicas secundáriasSecondary activities (CNAE)
9Código e descrição da natureza jurídicaLegal form, e.g. 206-2 limited company
10LogradouroStreet
11NúmeroStreet number
12ComplementoAddress complement (suite, floor, unit)
13CEPPostal code
14Bairro / DistritoNeighbourhood or district
15MunicípioMunicipality (city)
16UFState
17Endereço eletrônicoE-mail
18TelefonePhone number
19Ente federativo responsável (EFR)Responsible federative entity; filled only for public bodies
20Situação cadastralRegistration status: active, suspended, unfit, closed or null
21Data da situação cadastralDate of the status
22Motivo de situação cadastralReason for the status
23Situação especialSpecial status, e.g. judicial recovery
24Data da situação especialDate 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

SAP standard

Apply SAP’s notes for the alphanumeric CNPJ: validation, check digits, NF-e and reports. Search “CNPJ alfanumérico” in SAP for Me.

Custom code

Look for numeric checks, NUMC fields, number conversions and sorting that assume digits only.

Interfaces

Bank files, EDI, the tax engine, supplier portals and every system that receives a CNPJ from SAP.

Data loads

Templates and spreadsheets that strip letters or leading zeros from the CNPJ.