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:
| Part | Example | What it is for |
|---|---|---|
| Code | ACTIVE | Rules, filters, comparisons and formulas. It is stable and the same in every language |
| Label | Active, or Ativa in Portuguese | Display only. It follows the language and may change without notice |
Codes fall into two groups:
| Group | Examples | Possible values |
|---|---|---|
| Closed sets, defined by CNPJá | ACTIVE in the registration status, HEAD in the establishment type, SMALL in the company size | Described on the page of each piece of data, such as Registration status |
| Registry table codes, with a fixed length | Legal 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:
| Identifier | Format | Example |
|---|---|---|
| CNPJ and CNPJ root | 14 and 8 characters, with uppercase letters in alphanumeric CNPJs | 37335118000180, 37335118 |
| CPF | 11 digits. For partners and legal representatives, a masked CPF from the Receita Federal, with only the 4th to 9th digits visible | ***456789** |
| CEP | 8 digits | 01452922 |
| Municipality IBGE code | 7 digits | 3550308 |
| State registration | 8 to 14 characters, in each state’s format | 936389130 |
| Person and list | CNPJá’s own identifier (UUID), which is not a CPF or CNPJ | 3014e069-dd7f-429e-9649-484a424d5614 |
| State and country | State abbreviation and country code, with 2 letters | SP, BR |
Important: store identifiers and codes as text, never as numbers. Leading zeros are part of them, as in CEP
01452922and reason01, 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:
| Kind | Format | Example |
|---|---|---|
| Instant, with date and time | ISO 8601 in UTC, marked by the trailing Z | 2026-01-27T03:00:00. |
| Calendar date, with no time | YYYY-MM-DD, with no time or time zone | 2020-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. 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.. 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.
| Part | Content |
|---|---|
| Street, number, address complement and district | As registered, or empty when missing. The number is text, not a numeric value |
| Municipality | The name and the IBGE code, with 7 digits |
| State, CEP and country | The state abbreviation, the 8-digit CEP and the country, with a 2-letter code |
| Coordinates | Only 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.
| Value | How it appears |
|---|---|
| Code and label | Legal 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 identifiers | Numbers with a display mask. CNPJ, CEP, CNAE, legal nature and phones show their punctuation, as in 00. for a CNPJ, 00000-000 for a CEP, 0000-0/ 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 CPF | Text: the alphanumeric CNPJ without punctuation, as in 12ABC34501DE35, and the masked CPF with punctuation, as in ***. |
| Calendar date | An 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 date | An 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 capital | A number in reais, shown with the real symbol and two decimal places |
| Coordinates | Numbers with 7 decimal places |
| Missing value | A gray dash (—), not an empty cell |
| Language | Worksheet 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:
| Convention | In the response | Example |
|---|---|---|
| Code and label | An object with code and label, such as status and company.. 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 label | Plain text in address., ageGroup and the list type | SP, 31-40, ESTABLISHMENT |
| Federative entity | company. | BR |
| Instant | updatedAt, createdAt and the other fields with a time | 2026-01-27T03:00:00. |
| Calendar date | incorporationDate, statusDate, admissionDate and the other fields with no time | 2020-06-05 |
| Amount in reais | A number, as in company. | 99999. |
| Coordinate | address. and longitude, only in Lookup CNPJ with expand=address. | -23. |
| Count | An integer, as in total | 250 |
| Yes or no | true or false, as in stateRegistry. | true |
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.