Back to blog
cnpjalphanumericapi

Alphanumeric CNPJ: what changed and how to test it in the API

Since July 2026 the Federal Revenue issues CNPJs with letters. See a real one, what changed in the number, how cnpj-api responds and what to review in your system.

September 22, 2026cnpj-api.com4 min read
CNPJs now have letters. The API already reads them.
CNPJs now have letters. The API already reads them.

Since July 2026, Receita Federal has been issuing CNPJs that contain letters. They exist and they are already in the public data. If your system only accepts digits in the CNPJ field, it will turn away real companies.

cnpj-api now looks up, validates and formats the new format on every endpoint. Nothing changes for numeric CNPJs. This article shows a real alphanumeric CNPJ, what changed in the number, how the API responds and what to review on your side.

A real CNPJ to test with

00.000.000/E08G-12

It is a Banco do Brasil branch in Brasília, opened on 2026-07-31. It is in the Federal Revenue dataset and the API already returns it. The letters are in the branch part (E08G) while the root 00.000.000 is still numeric: that is how most of the first alphanumeric CNPJs show up, as new branches of companies that already exist.

You can open the public page for this company at cnpj-api.com/en/cnpj/00000000E08G12.

Tip

No token needed. The public page runs the same lookup as the API. If it opens, your integration can fetch it too.

What changed in the number

PositionsBeforeNow
1 to 8 (root)Digits onlyLetters A to Z or digits
9 to 12 (branch)Digits onlyLetters A to Z or digits
13 and 14 (check digits)Digits onlyDigits only

The length is still 14 characters and the formatting is still XX.XXX.XXX/XXXX-XX. The check digits use the same mod 11 calculation as always, with one extra rule: each letter is worth its ASCII code minus 48, so A=17, B=18, and so on up to Z=42. Digits keep their face value.

Both formats coexist. No numeric CNPJ stops being valid, and no existing company had its number changed.

How cnpj-api responds

Look up an alphanumeric CNPJ exactly like a numeric one:

curl "https://api.cnpj-api.com/v1/cnpj/00000000E08G12" \
  -H "api-token: YOUR_TOKEN"

Response, main fields:

{
  "cnpj": "00000000E08G12",
  "razao_social": "BANCO DO BRASIL SA",
  "data_abertura": "2026-07-31",
  "matriz": false,
  "mei": false,
  "situacao": { "codigo": 2, "descricao": "Ativa" },
  "atividade_principal": {
    "codigo": 6422100,
    "descricao": "Bancos múltiplos, com carteira comercial"
  },
  "endereco": { "municipio": "BRASILIA", "uf": "DF" },
  "empresa": {
    "cnpj_basico": "00000000",
    "porte": { "codigo": 5, "sigla": "Demais", "descricao": "Demais" }
  }
}

The API accepts the CNPJ with or without punctuation, in upper or lower case. The response always returns it in upper case. The same goes for /v1/simples, for bulk lookups and for the receitaws and cnpja compatibility formats.

The new mei field

Along with alphanumeric support, the /v1/cnpj response gained a top-level field:

{
  "cnpj": "00000000E08G12",
  "mei": false
}

mei is true when the company is enrolled as an individual microentrepreneur (MEI) and false otherwise, including when it never opted into Simples Nacional. It is always present, so you can filter on it without checking whether empresa.simei exists. It is an added field: nothing was removed or renamed. The endpoint documentation describes the full response, and the guide How to tell whether a CNPJ is a MEI explains what the enrollment means and the other ways to check it.

What to review in your system

Validation. Wherever your system checks that a CNPJ has 14 digits, start accepting letters in the first 12 positions. In practice: replace ^\d{14}$ with ^[A-Z0-9]{12}\d{2}$ and apply the letter mapping when computing the check digits.

Form fields. Input masks that drop letters and inputmode="numeric" stop users from typing the new CNPJ. The field needs to accept letters and digits.

Database. Numeric columns, or CHAR(14) columns with digit-only checks, need to accept letters. If the CNPJ is used as a key, also review indexes and integrations that receive the value.

To check a number by hand, the CNPJ validator shows every step of the calculation and tells you whether the number is traditional or alphanumeric. The alphanumeric CNPJ generator creates valid numbers for your tests.

Warning

A generated CNPJ has correct check digits but does not exist at the Federal Revenue. To test a lookup end to end, use a real CNPJ such as 00000000E08G12.

New companies show up first in real-time data

Every alphanumeric CNPJ is a newly opened company or branch. On the free plan, lookups use the monthly Federal Revenue dataset, so a company opened this week only appears after the next update. On the Basic and Pro plans, the lookup falls back to real-time data when the CNPJ is not in the dataset yet.

Frequently asked questions

Will my current CNPJ change?

No. CNPJs already issued stay the same and remain valid. Only new registrations get the alphanumeric format.

Are the check digits still numeric?

Yes. Positions 13 and 14 are always digits, in both formats.

Does bulk lookup accept the new format?

Yes. Send the alphanumeric CNPJ in the list like any other. The response returns the number in upper case.

I found an alphanumeric CNPJ that did not respond as expected

Write to [email protected] with the number. The team looks at every case.