Skip to content
Data formats: codes, identifiers and dates
Help · Data

Data formats: codes, identifiers and dates

How CNPJá writes its data: codes and labels, identifiers as text, dates and time zones, amounts in reais, addresses and the language of the labels.

CNPJá data follows fixed conventions: the API delivers it in this format, and the app shows the same data formatted for reading. Knowing them avoids the most common mistakes when storing and matching this data: comparing text that changes, losing leading zeros and shifting dates across time zones.

Codes and labels

Everything that classifies a piece of data, such as the registration status, the company size or the phone type, has two parts:

PartExampleWhat it is for
CodeACTIVERules, filters, comparisons and formulas. It is stable and the same in every language
LabelActive, or Ativa in PortugueseDisplay only. It follows the language and may change without notice

Codes fall into two groups:

GroupExamplesPossible values
Closed sets, defined by CNPJáACTIVE in the registration status, HEAD in the establishment type, SMALL in the company sizeDescribed on the page of each piece of data, such as Registration status
Registry table codes, with a fixed lengthLegal nature 2062 (4 digits), CNAE 6311900 (7), registration status reason 01 (2), special status 418 (3), partner role 49 (2)Official classification tables, such as CNAE. The label describes each code

The federative entity code is BR for the Union, the state abbreviation for states and the Federal District, or the IBGE code for municipalities. The state, such as SP, and the partners’ age group, such as 31-40, are fixed values with no separate label.

In the app, the screen shows the label and, for registry table codes, the code before it as well. In the economic activity and the legal nature, for example, the code and the label each have their own copy button.

Important: never use the label in rules, filters or spreadsheet formulas, because it may change without notice. Compare the code, which comes with every label in API responses.

Identifiers as text

Identifiers and codes are text, without display punctuation, even when they hold only digits:

IdentifierFormatExample
CNPJ and CNPJ root14 and 8 characters, with uppercase letters in alphanumeric CNPJs37335118000180, 37335118
CPF11 digits. For partners and legal representatives, a masked CPF from the Receita Federal, with only the 4th to 9th digits visible***456789**
CEP8 digits01452922
Municipality IBGE code7 digits3550308
State registration8 to 14 characters, in each state’s format936389130
Person and listCNPJá’s own identifier (UUID), which is not a CPF or CNPJ3014e069-dd7f-429e-9649-484a424d5614
State and countryState abbreviation and country code, with 2 lettersSP, BR

Important: store identifiers and codes as text, never as numbers. Leading zeros are part of them, as in CEP 01452922 and reason 01, and alphanumeric CNPJs have letters. To show punctuation, as in 37.335.118/0001-80, format the value only for display.

In the app, the CNPJ appears with punctuation, and the copy button copies the 14 characters without it. How to type, store and compare CNPJs with letters is covered in Alphanumeric CNPJ.

Dates and times

The data has two kinds of date, which are not handled the same way:

KindFormatExample
Instant, with date and timeISO 8601 in UTC, marked by the trailing Z2026-01-27T03:00:00.000Z
Calendar date, with no timeYYYY-MM-DD, with no time or time zone2020-06-05

An instant, such as the moment a piece of data was last updated, is in UTC. Convert it to Brasília time (UTC−3), or to the reader’s time zone, only for display: 2026-01-27T03:00:00.000Z is 01/27/2026, 00:00 in Brasília.

A calendar date, such as the opening date, the registration status date or a partner’s admission date, stands for a day and does not go through a time zone conversion. Read as midnight UTC and converted to Brasília time, the date 2020-06-05 would become 06/04/2020, one day earlier.

The D0 marker and the date shortcuts of the filters, such as Today and Yesterday, count days in Brasília time, the time the Receita Federal dates an opening in, as explained in The D0 marker. In the app, instants appear in your browser’s time zone, and calendar dates appear as they are, as described in Time zone and dates.

Amounts in reais

Monetary amounts, such as the share capital, are numbers in reais, with a decimal point and no currency symbol or thousands separator, as in 99999.99. To show the amount with the real sign and Brazilian punctuation, format the number only for display, and use a decimal type rather than floating point in calculations, so rounding errors do not add up.

In the app, the share capital appears formatted in the interface language, and the copy button copies only the number, with the decimal separator of the interface language and no symbol or thousands separator.

Phones and e-mails

Phones come in the international E.164 format, as in +5511900000000, and e-mails in lowercase. Normalization and the types CNPJá calculates, such as mobile or corporate e-mail, are covered in Company phones and e-mails.

Addresses

Addresses share the same structure everywhere: in the establishment registration, in state registrations and in SUFRAMA registrations.

PartContent
Street, number, address complement and districtAs registered, or empty when missing. The number is text, not a numeric value
MunicipalityThe name and the IBGE code, with 7 digits
State, CEP and countryThe state abbreviation, the 8-digit CEP and the country, with a 2-letter code
CoordinatesOnly in the Receita Federal registration address: latitude and longitude in decimal degrees, negative south of the Equator and west of Greenwich, as explained in Address coordinates and imagery
  • To match addresses against other databases, use the municipality’s IBGE code, which does not depend on how the name is spelled.
  • The address of a state registration or a SUFRAMA registration comes from the corresponding registry and may differ from the one registered at the Receita Federal.
  • A Correios CEP uses the same street, district, municipality and state parts, but may not match the CEP in the Receita Federal registration, as explained in Correios CEP and Receita CEP.

Label language

Labels come in Portuguese or English. In the app, they follow the interface language, as explained in Language, theme and time zone; in the API, the language asked for in the request. The language of the exported spreadsheet is in In the spreadsheet.

The language never changes codes and numbers, nor official-source data: legal names, trade names, person names, streets and municipalities come as registered. In the API, dates do not change with the language either; in the spreadsheet, they take the format of its language. The meaning of official terms is in the Glossary.

In the spreadsheet

The spreadsheet of an export or a bulk lookup holds the data already formatted for reading in Excel, not in the API format. Its tabs and columns are in Exported spreadsheet format.

ValueHow it appears
Code and labelLegal nature, economic activities and municipality have the code in one column and the label in another. Registration status, status reason, size, partner role and the other classifications come with the label only
Digit-only identifiersNumbers with a display mask. CNPJ, CEP, CNAE, legal nature and phones show their punctuation, as in 00.000.000/0000-00 for a CNPJ, 00000-000 for a CEP, 0000-0/00 for a CNAE, 000-0 for a legal nature and (00) 00000-0000 for a mobile, and the IBGE code and registration numbers show only their digits, leading zeros included. Phones come with the area code and without the country code
Alphanumeric CNPJ and masked CPFText: the alphanumeric CNPJ without punctuation, as in 12ABC34501DE35, and the masked CPF with punctuation, as in ***.456.789-**
Calendar dateAn Excel date, with no time, that sorts and filters as a date, in the dd/mm/yyyy format, or mm/dd/yyyy in a spreadsheet in English
Update dateAn Excel date and time, in the dd/mm/yyyy hh:mm format, or mm/dd/yyyy hh:mm in a spreadsheet in English, in UTC and with no time zone shown: subtract 3 hours to get Brasília time
Share capitalA number in reais, shown with the real symbol and two decimal places
CoordinatesNumbers with 7 decimal places
Missing valueA gray dash (—), not an empty cell
LanguageWorksheet and column names, labels and yes and no come in Portuguese or English, and dates in that language’s format, following the e-mail and spreadsheet language of the account that requested the export, read at the request. Whoever downloads it later gets the same file, and changing the language only applies to later exports

When you work with the spreadsheet:

  • Do not change the format of the identifier columns to General or Number: the punctuation and leading zeros disappear from view, because the value stored in the cell is the number without them. In formulas and when matching against another base, as in a VLOOKUP, the cell is worth that number too. To take an identifier to another system as text, put back the missing zeros: the CNPJ has 14 characters, the CEP 8 and the IBGE code 7. When you import CNPJs back, CNPJá restores the zeros Excel removed by itself, as explained in Leading zeros and Excel.
  • In formulas, filters and pivot tables, use the code where the spreadsheet has it. In classifications that have a label only, keep in mind that it can change without notice and changes with the spreadsheet’s language, as explained in Codes and labels.
  • The dash of a missing value is text: take it into account in formulas that count or test empty cells.
  • Do not apply a time zone to calendar dates: only update dates have a time.

In the API

API responses apply these conventions field by field:

ConventionIn the responseExample
Code and labelAn object with code and label, such as status and company.size. The values of each code are in the Reference and in the Codes and values sections of the API pages{ "code": "ACTIVE", "label": "Ativa" }
Fixed value with no labelPlain text in address.state, ageGroup and the list typeSP, 31-40, ESTABLISHMENT
Federative entitycompany.federativeEntity.codeBR
InstantupdatedAt, createdAt and the other fields with a time2026-01-27T03:00:00.000Z
Calendar dateincorporationDate, statusDate, admissionDate and the other fields with no time2020-06-05
Amount in reaisA number, as in company.shareCapital99999.99
Coordinateaddress.coordinates.latitude and longitude, only in Lookup CNPJ with expand=address.coordinates-23.5774497
CountAn integer, as in total250
Yes or notrue or false, as in stateRegistry.registrations[].isEnabledtrue

In JavaScript, for example, new Date('2020-06-05') is read as midnight UTC and shown as 06/04/2020 in Brasília time. Handle calendar dates as text or with a date library that has no time zone.

The address object has street, number (text), details, district, city, municipality (IBGE code), state, postalCode and country (with code and label) in Lookup CNPJ, Lookup company, Search CNPJ and in state and SUFRAMA registrations. Lookup CEP uses the same street, district, municipality and state fields, with the CEP in code and no country, as described in CEPs and addresses in the API.

The language of label follows the Accept-Language header, as described in Response format. The contact fields are in Company phones and e-mails.

Informational content that may change without notice. It is not tax, accounting or legal advice, and CNPJá's terms and policies prevail over this page.