Malaysia postcode lookup — postcode to state

Paste one postcode (or a dirty line containing one) per line and get postcode, state, city and status back as clean CSV.

🔒 100% client-side · zero server upload

What was removed

Malaysian rules & edge cases

How Malaysian postcodes work. Every Malaysian postcode is exactly five digits. The first two digits identify the state (or federal territory), and the full five digits identify the delivery area. This tool ships with a bundled client-side dataset covering major cities, with a two-digit prefix fallback that returns state only for postcodes not listed exactly.

Postcode rangeState / territoryTypical cities
01000–02800PerlisKangar, Arau, Padang Besar
05000–09800KedahAlor Setar, Sungai Petani, Langkawi
10000–14300PenangGeorge Town, Butterworth, Bukit Mertajam
15000–19000KelantanKota Bharu, Tumpat, Gua Musang
20000–24400TerengganuKuala Terengganu, Dungun, Kemaman
25000–28900, 39000–39100, 69000PahangKuantan, Temerloh, Cameron Highlands
30000–36900PerakIpoh, Taiping, Teluk Intan
40000–49900, 63000–64200, 68000–68800SelangorShah Alam, Klang, Subang Jaya, Kajang
50000–59900Kuala LumpurKuala Lumpur city centre, Cheras, Setapak
62000–62900PutrajayaPutrajaya
70000–73400Negeri SembilanSeremban, Port Dickson, Nilai
75000–78500MelakaMelaka, Alor Gajah, Jasin
80000–86900JohorJohor Bahru, Batu Pahat, Muar, Kluang
87000–87900LabuanLabuan
88000–92900SabahKota Kinabalu, Sandakan, Tawau
93000–98900SarawakKuching, Sibu, Miri, Bintulu

Dataset, not a live API. Lookups run entirely against the postcode dataset bundled into this page — no request is sent to POS Malaysia or any server. Coverage is representative of major cities; a postcode not listed exactly falls back to state only, and postcodes can change over time, so verify critical addresses with POS Malaysia.

Lines without a five-digit postcode are reported as invalid, and duplicate postcodes are removed after the first occurrence — both appear in the removed list so nothing disappears silently.

Before and after

Before

Ali, 47500 Subang Jaya
Siti — 47500 again
Bala 10400
no postcode here

After

47500,Selangor,Subang Jaya,exact
10400,Penang,George Town,exact

How it works

  1. Paste postcodes — one per line, or inside dirty address lines — into the INPUT box, or press "Load sample data" to see a Malaysian example.
  2. Press Run. Each five-digit postcode is extracted, deduplicated and matched against the bundled dataset.
  3. Copy the CSV result (postcode, state, city, status) from the OUTPUT box, and check the removed list for invalid or duplicate lines.

FAQ

Is this a live POS Malaysia lookup?

No. It is a bundled client-side dataset that ships with the page. Nothing is fetched at runtime, which is why it works offline and sends zero data anywhere — but also why coverage is representative rather than exhaustive.

What does "state only" mean?

The exact five-digit postcode is not in the bundled city list, but its two-digit prefix maps to a state. You get the state with an empty city and status "state only" instead of a guessed city.

Why were some of my lines removed?

A line is removed when it contains no five-digit postcode (reported as invalid postcode) or when that postcode already appeared earlier in your input (reported as duplicate postcode). Every removal is listed with its line number.

Can postcodes inside my addresses be extracted?

Yes. The first five-digit number on each line is used, so lines like "Lot 12, 47500 Subang Jaya" work. Phone numbers with hyphens or spaces are not matched as postcodes because the pattern requires exactly five consecutive digits bounded by non-digits.