CEP (Zip Code) Generator
Generate valid Brazilian ZIP codes from different regions for structural tests.
Waiting for generation...
About the CEP Generator
The Box4Dev CEP Generator creates 8-digit Postal Addressing Codes following the regional distribution rules. These are structurally valid for testing masks and front-end validations.
Although the numbers follow correct regional logic, they are generated randomly and may not correspond to real streets in API lookups. They are ideal for offline form testing.
Anatomy of Brazilian Postal Code (CEP)
CEP comprises 8 decimal digits structured as NNNNN-NNN:
| Position | Field | Length | Meaning & Rule | Example |
|---|---|---|---|---|
| 1 | Postal Macro-Region | 1 digit | Nationwide postal region from 0 to 9 | 0 |
| 2 to 5 | Sector & Subsector | 4 digits | City, postal district or municipal subsector | 1001 |
| 6 to 8 | Distribution Suffix | 3 digits | Specific street, building or major delivery customer | 000 |
Geographical Postal Distribution of Brazil
The 1st digit defines the 10 Correios logistic regions:
0: SP Capital | 1: SP Inland | 2: RJ/ES | 3: MG | 4: BA/SE | 5: PE/AL/PB/RN | 6: North | 7: Central-West | 8: PR/SC | 9: RS
- 1. The first digit determines the federal state or macro postal zone.
- 2. The next four digits form the municipal routing radical.
- 3. An optional hyphen separates radical and distribution suffix.
- 4. The final three digits target specific delivery streets or centers.