Countries API - CountriesDB

Mexico

ISO 3166-1 country codes and official ISO 3166-2 subdivisions for Mexico. Use them in forms, validation, and CountriesDB integrations.

About Mexico codes

Need Mexico (MX) for a checkout form, shipping zone, or backend validation? This page summarizes the ISO 3166-1 country codes and official subdivisions developers use with CountriesDB.

This guide lists 32 official ISO 3166-2 subdivisions for Mexico. These are the same codes CountriesDB serves through widgets and the Backend Data API.

For production, use the CountriesDB country/subdivision widget or fetch Mexico from the Data API and validate codes server-side instead of copying values from this page.

ISO codes

  • Alpha-2MX
  • Alpha-3MEX
  • Numeric484
  • Independenttrue
  • StatusOfficially assigned

Official subdivisions (32)

Official ISO 3166-2 codes for Mexico. Use these values in region/state selects and server-side validation, not informal or marketing region names.

CodeNameType
MX-AGUAguascalientesstate
MX-BCNBaja Californiastate
MX-BCSBaja California Surstate
MX-CAMCampechestate
MX-CHPChiapasstate
MX-CHHChihuahuastate
MX-CMXCiudad de Méxicofederal entity
MX-COACoahuila de Zaragozastate
MX-COLColimastate
MX-DURDurangostate
MX-GUAGuanajuatostate
MX-GROGuerrerostate
MX-HIDHidalgostate
MX-JALJaliscostate
MX-MEXMéxicostate
MX-MICMichoacán de Ocampostate
MX-MORMorelosstate
MX-NAYNayaritstate
MX-NLENuevo Leónstate
MX-OAXOaxacastate
MX-PUEPueblastate
MX-QUEQuerétarostate
MX-ROOQuintana Roostate
MX-SLPSan Luis Potosístate
MX-SINSinaloastate
MX-SONSonorastate
MX-TABTabascostate
MX-TAMTamaulipasstate
MX-TLATlaxcalastate
MX-VERVeracruz de Ignacio de la Llavestate
MX-YUCYucatánstate
MX-ZACZacatecasstate

Frequently asked questions

What is the ISO 3166-1 code for Mexico?
Mexico uses ISO 3166-1 alpha-2 MX, alpha-3 MEX, and numeric 484. These codes show up in forms, shipping, banking, and APIs.
How many official ISO 3166-2 subdivisions does Mexico have?
CountriesDB lists 32 official ISO 3166-2 subdivisions for Mexico (states, provinces, regions, or equivalent). Use them when you validate region selects and shipping zones.
How do I use Mexico country and subdivision data in a form?
Use the CountriesDB widget or Data API to fill country and subdivision selects for Mexico, then validate submitted codes with the Validation API so alpha-2 and ISO 3166-2 values stay consistent.

Use Mexico in your app

Add CountriesDB country and subdivision selects with the widget docs, or call the Backend Data API for Mexico (MX) and validate submissions with the Validation API. Guides stay in sync with the same dataset your project keys already use. widget docs.