Countries API - CountriesDB

Malaysia

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

About Malaysia codes

Need Malaysia (MY) 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 16 official ISO 3166-2 subdivisions for Malaysia. These are the same codes CountriesDB serves through widgets and the Backend Data API.

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

ISO codes

  • Alpha-2MY
  • Alpha-3MYS
  • Numeric458
  • Independenttrue
  • StatusOfficially assigned

Official subdivisions (16)

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

CodeNameType
MY-01Johorstate
MY-02Kedahstate
MY-03Kelantanstate
MY-04Melakastate
MY-05Negeri Sembilanstate
MY-06Pahangstate
MY-08Perakstate
MY-09Perlisstate
MY-07Pulau Pinangstate
MY-12Sabahstate
MY-13Sarawakstate
MY-10Selangorstate
MY-11Terengganustate
MY-14Wilayah Persekutuan Kuala Lumpurfederal territory
MY-15Wilayah Persekutuan Labuanfederal territory
MY-16Wilayah Persekutuan Putrajayafederal territory

Frequently asked questions

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

Use Malaysia in your app

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