Skip to main content

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:

PositionFieldLengthMeaning & RuleExample
1Postal Macro-Region1 digitNationwide postal region from 0 to 90
2 to 5Sector & Subsector4 digitsCity, postal district or municipal subsector1001
6 to 8Distribution Suffix3 digitsSpecific street, building or major delivery customer000

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. 1. The first digit determines the federal state or macro postal zone.
  2. 2. The next four digits form the municipal routing radical.
  3. 3. An optional hyphen separates radical and distribution suffix.
  4. 4. The final three digits target specific delivery streets or centers.

Frequently Asked Questions (FAQ)