1001Ferramentas
🇧🇷Generators

IBGE UF Codes List

List the 27 IBGE Brazilian state codes (11-53) with abbreviation and name. For UF dropdown population.


  

IBGE UF code: Brazil's two-digit state identifier

The IBGE UF code is a two-digit numeric identifier assigned to each of Brazil's 27 federative units (26 states plus the Federal District). It is maintained by IBGE — the Brazilian Institute of Geography and Statistics — and was formalised by an IBGE resolution in 1976, back when Guanabara had only just been merged into Rio de Janeiro. Unlike the familiar two-letter abbreviations (SP, RJ, DF) that appear on licence plates and ID cards, the numeric code is the technical identifier expected by every Brazilian fiscal system, from electronic invoices to social-security filings.

How the two digits encode geography

The first digit identifies the region (1 North, 2 Northeast, 3 Southeast, 4 South, 5 Center-West); the second digit reflects alphabetical order within that region. So Rondônia, the alphabetically first state of the North, gets 11, and São Paulo, in the Southeast, gets 35.

Full table of all 27 codes

  • North: 11 RO, 12 AC, 13 AM, 14 RR, 15 PA, 16 AP, 17 TO
  • Northeast: 21 MA, 22 PI, 23 CE, 24 RN, 25 PB, 26 PE, 27 AL, 28 SE, 29 BA
  • Southeast: 31 MG, 32 ES, 33 RJ, 35 SP
  • South: 41 PR, 42 SC, 43 RS
  • Center-West: 50 MS, 51 MT, 52 GO, 53 DF

Where the code shows up

The UF code is the first two digits of an NF-e access key — the 44-digit identifier of every Brazilian electronic invoice. It also opens the 7-digit IBGE municipal code (UF + 5 sequential digits), drives geographical fields in e-Social, EFD-Reinf, RAIS, SPED and the title-of-elector registry, and is the canonical state key in every federal API. Don't confuse it with the DDD area code used in telephony (11 = São Paulo capital, 21 = Rio capital) — those numbers are coincidentally similar but governed by Anatel, not IBGE.

FAQ

Does the code change when a new state is created? A new code is allocated. Tocantins was carved out of Goiás by the 1988 Constitution and received 17, slotting into the North block. Mato Grosso do Sul was created earlier (1977) and took 50.

Can I use the generated codes for mock fiscal data? Yes — these are the real official codes, perfect for seeding ERP/test databases that need plausible NF-e keys or municipal IDs.

Is the numeric code mandatory on an electronic invoice, or is the two-letter abbreviation enough? The abbreviation (SP, RJ, …) is a visual standard for printed DANFE forms; the technical XML schema for NF-e requires the numeric code in the cUF field and in the first two characters of chNFe.

Where can I look up the official table? IBGE publishes it at servicodados.ibge.gov.br/api/v1/localidades/estados as a public JSON endpoint.

Related Tools