CEP Generator
Generate Brazilian postal codes (CEP) by state for software testing. Numbers within the real postal code ranges per UF. For test use only.
What is a ZIP Code generator used for?
CEP, short for Brazilian Postal Code, is an 8-digit number the postal service uses to identify regions across Brazil, and each state occupies a specific range of those numbers.
It comes in handy when you need to test address forms, double-check shipping calculations or validate postal API integrations while developing.
The generated CEPs are within the real ranges per state but may not correspond to a real address.
How the Brazilian postal code (CEP) works
The CEP — Código de Endereçamento Postal is the eight-digit postal code created by the Brazilian Post Office (Correios) in 1971 through DEPLAN Standard nº 1/71. Originally it had five digits; in May 1992 the format was expanded to eight to support finer routing in large cities. The canonical notation is XXXXX-XXX, where the first five digits encode geography (region, sub-region, sector, sub-sector and divisor) and the three digits after the hyphen are the suffix — pointing to a specific street segment, block, building or post-office customer.
Geographic layout
The very first digit splits Brazil into ten postal regions:
- 0 — São Paulo (capital and metropolitan area)
- 1 — São Paulo state, interior
- 2 — Rio de Janeiro and Espírito Santo
- 3 — Minas Gerais
- 4 — Bahia and Sergipe
- 5 — Pernambuco, Alagoas, Paraíba, Rio Grande do Norte, Ceará, Piauí, Maranhão
- 6 — Pará, Amazonas, Acre, Amapá, Rondônia, Roraima, Tocantins
- 7 — Distrito Federal, Goiás, Mato Grosso, Mato Grosso do Sul
- 8 — Paraná and Santa Catarina
- 9 — Rio Grande do Sul
The next digits narrow the location down: the second is the sub-region, the third the sector, the fourth the sub-sector and the fifth the divisor of sub-sector. Together these five digits identify a city, a district or a large block within a metropolitan area. The three digits after the hyphen — the suffix — pinpoint a street, a side of a street, a building or a post-office box range.
Special suffixes
-000— single CEP for an entire small town (no per-street resolution)-899— post-office boxes (caixas postais comunitárias)-900to-959— large customers (banks, ministries, universities with their own CEP)-970to-989— Correios service units
Looking up real addresses
Correios maintains the authoritative database through the SIGEP service and licenses it via DNE (Diretório Nacional de Endereços). Free community front-ends like ViaCEP and BrasilAPI wrap the same data with a friendlier REST API and are widely used by Brazilian e-commerce checkouts for address autocomplete.
FAQ
How do I find the right CEP for an address? Use the Correios website (buscacepinter.correios.com.br) or any ViaCEP-based widget — type street and city and the CEP comes back. Avoid guessing: a single street can span several CEPs if it crosses sectors.
Why does my neighborhood share one CEP while another has a unique CEP per street? Smaller towns and low-density districts use a generic CEP ending in -000. Large cities receive granular CEPs — sometimes one per block side — to speed up sorting.
Are CEPs updated over time? Yes. Correios reviews the directory continuously as new streets are opened, neighborhoods are redrawn or large customers receive their own code. Always validate via the official lookup before printing labels in bulk.
Can I use these generated CEPs in production? No. The numbers follow the correct geographic prefix but are not registered in DNE. Use them only for tests, mocks and form-validation development — never for shipping or address forms tied to real deliveries.
Related Tools
Handwriting Generator
Convert typed text into an image with handwriting appearance. Useful for adding a personal touch to digital work.
Resume Generator
Fill a simple printable A4 CV from a form with personal data, education and experience.
Favicon Generator
Generate a favicon from text/emoji in all common sizes (16, 32, 48, 64, 192, 512). PNG download.
Generate postal codes by state for testing
When you set out to test address forms, shipping integrations or logistics systems, grabbing any real postal code tends to give odd results. What you actually want is a code that fits the test. This generator creates postal codes by state, within each region's official ranges, built for people validating software.
You pick the state and the tool returns codes in that region's correct numeric ranges. Because they respect the link between postal code and state, they behave well in tests that check that correspondence. Use them to seed a development database, verify shipping calculations by region or sign off on address forms.
Nothing is looked up in an external database; it all comes straight from your browser. Bear in mind these are fictitious codes meant for testing, and they won't necessarily match a real existing address.