Search for the official IBGE code of Brazilian state capitals and major cities — the 7-digit identifier used in government forms and APIs.
Every Brazilian municipality has a 7-digit code assigned by the IBGE — the Brazilian Institute of Geography and Statistics. This code is not the same as the postal code (CEP) or the area code (DDD): it identifies the municipality itself, and it is the one that appears on electronic invoices (NF-e), eSocial filings, government APIs, and any official form that asks for the municipality of origin or destination.
The first two digits identify the state (35 for São Paulo, 33 for Rio de Janeiro), the next four identify the municipality within the state, and the last digit is a check digit. The code is stable — municipalities that change their names keep the same number, and it is never reassigned. That stability is why APIs and government systems use it instead of the name, which can have accent variations, abbreviations, and outright typos.
This page covers state capitals and the largest cities. For the full list of 5,570 municipalities, the IBGE API at servicodados.ibge.gov.br is the authoritative source. Everything here runs in your browser — no request is made to the IBGE or any other server, and nothing you type is logged.
On electronic invoices (NF-e), eSocial payroll submissions, Simples Nacional declarations, and many government APIs. Any system that asks for "código do município" wants this number.
No. The CEP (postal code) identifies a street or a range of addresses. The IBGE code identifies the municipality as a whole. A city has one IBGE code and many CEPs.
No — it covers state capitals and major cities. The full list of 5,570 municipalities is available from the IBGE API.
No. The code table is embedded in the page and the search runs locally.
Vai.la turns any URL into a short link with click statistics, QR Code and your own biolink.
Vai.la is not responsible for how the tools are used or for decisions made based on their results.