CEP (Brazilian ZIP Code) Generator and Validator

Generate plausible CEPs by Brazilian region and validate the format of a CEP.

Generate CEP

Validate CEP

What is the CEP?

The CEP (Código de Endereçamento Postal) is a numeric system created by the Brazilian postal service (Correios) in 1972 to identify streets, localities, buildings and postal services in Brazil. It consists of 8 digits in the format NNNNN-NNN, where the first 5 digits identify the region/sector and the last 3 identify the sub-sector and suffix.

The CEP is widely used in e-commerce, logistics, registration and delivery systems to determine the destination address. Unlike the CPF and CNPJ, the CEP has no check digit — there is no mathematical calculation that confirms whether a CEP exists; the only way to verify that is by consulting the Correios' official database.

CEP structure by region

The first digit of the CEP determines the broad coverage region, according to the Correios' official table:

1st digit Region
0Greater São Paulo
1São Paulo countryside
2Rio de Janeiro and Espírito Santo
3Minas Gerais
4Bahia and Sergipe
5Pernambuco, Alagoas, Paraíba and Rio Grande do Norte
6Ceará, Piauí, Maranhão, Pará, Amazonas, Acre, Amapá and Roraima
7Distrito Federal, Goiás, Tocantins, Mato Grosso, Mato Grosso do Sul and Rondônia
8Paraná and Santa Catarina
9Rio Grande do Sul

Important: format validation, not existence

This tool validates only the format of the CEP — it checks whether the supplied value has exactly 8 numeric digits, which is the minimum requirement for a plausible CEP. It does not confirm whether the CEP exists in the Correios' database, nor does it return the corresponding street address. To look up a real CEP, use the public ViaCEP API or the official Correios website.

Likewise, the CEPs generated by this tool are numerically plausible (they respect the first-digit range of the selected region), but may not correspond to any real address — they are useful for filling form fields in development and testing environments.

Frequently Asked Questions (FAQ)

Does the CEP have a check digit?

No. Unlike the CPF and CNPJ, the Brazilian CEP has no check digit. This means any sequence of 8 digits is "mathematically valid" — there is no calculation that detects an incorrect CEP without consulting the Correios' database. Validation here is format-only (8 numeric digits).

Do the generated CEPs correspond to real addresses?

Not necessarily. The generated CEPs are plausible (they respect the first digit of the chosen region), but the remaining digits are random. It is possible for a generated CEP to coincide with a real address, but that is purely coincidental. For tests that require real CEPs, use a curated list of known CEPs or consult the Correios.

What is generating fictitious CEPs useful for?

While developing systems that have address fields, it is common to need fictitious CEPs to fill in test forms, populate development databases, test front-end validations or simulate registrations without using real user data.

Does the mask (hyphen) interfere with validation?

No. The tool automatically removes any hyphen or space before validating — you can paste the CEP with or without the NNNNN-NNN mask.