Mexico código postal validator
How the código postal format works
- Format
- 5 digits
- Example
- 06000
Things to watch for
- Format-only check — does not confirm the código postal actually exists
- Always exactly 5 digits with no separators
^[0-9]{5}$A Mexican código postal is the 5-digit postcode Correos de México (SEPOMEX) uses to route mail, written with no separator — for example 06000 for the Cuauhtémoc area of central Mexico City. The first two digits identify the state the address falls in, and the remaining three narrow that down toward a specific colonia or delivery zone. Anyone validating a Mexican shipping address or a checkout form needs the código postal to at least be the right length and shape before it’s trusted.
Because the code is a plain 5-digit run with nothing to anchor against, a dropped or duplicated digit is easy to miss visually while still looking entirely plausible — and because so many Mexican address forms use the código postal to auto-fill a colonia, a malformed code can silently break that lookup downstream.
How this validator works
This tool checks that the input is exactly 5 digits with no letters, spaces, or hyphens, entirely in your browser, with nothing sent to a server.
What a pass doesn’t tell you
A código postal carries no check digit, so a correctly shaped 5-digit string is the most a client-side tool can confirm — not that Correos de México has assigned it to a real colonia or street. Confirming that requires Correos de México’s own postal code lookup.
Scope: this page and tool cover format validation only — not address lookup, colonia matching, or confirming a code is currently in use.
código postal FAQ
What do the first two digits of a código postal mean?
Correos de México, through SEPOMEX, assigns the first two digits to identify the state or administrative entity an address sits in — for example 06 marks Mexico City's Cuauhtémoc area. The remaining three digits narrow that down toward a specific colonia (neighbourhood) or delivery zone.
Why do Mexican address forms often ask for a código postal and then show a colonia to pick from?
Because each 5-digit código postal maps to one or more specific colonias, many Mexican checkout forms use the code you enter to look up and auto-fill the matching neighbourhood. This tool doesn't do that lookup — it only checks that what you typed is a valid 5-digit shape.
Does a correctly formatted código postal mean it actually exists?
No. This tool only confirms the string is exactly 5 digits — it doesn't check it against Correos de México's actual assignment list. Confirming a code is real, and seeing which colonia it covers, requires Correos de México's own postal code lookup.