Phone Number Parser

Share:

Parse and format phone numbers in E.164, national, and international formats. Country dropdown defaults to ASEAN.

RT-DEV-072 · Developer Tools

Phone Number Parser Tool

Advertisement
After results · AD-W1 Responsive · Post-tool — peak engagement

How to use the phone parser

Single mode

Paste a phone number with or without a country prefix. Pick the default country (the country to assume when no + is provided). The tool returns E.164, national format, international format, RFC 3966 (tel:), and line type.

Numbers starting with +

If the input starts with +, the country is read from the number itself and the dropdown becomes optional. Otherwise the dropdown's country is used to interpret a national-format number.

Bulk mode for lists

Paste hundreds of phone numbers; the tool builds a table with one row per number showing valid/invalid, E.164, national format, country, and line type. Download as CSV for Excel or your CRM.

ASEAN-first defaults

Singapore, Malaysia, Indonesia, Thailand, Philippines, Vietnam, Brunei, Cambodia, Laos, and Myanmar are listed first in the country dropdown. The rest of the world is in alphabetical order below.

Advertisement
After how-to · AD-W2 Responsive

Phone number parsing — E.164 and the ASEAN landscape

Phone numbers look simple. They're not. The same 8-digit string can be valid in Singapore (where mobile numbers are 8 digits starting with 8 or 9), simultaneously invalid in Malaysia (10-11 digits), and ambiguous in Indonesia (numbers start with 0, dropped when written internationally). Add international prefixes (+65, +60, +62), local trunk prefixes (the 0 you dial domestically but drop internationally), carrier-specific number ranges, and the difference between mobile, fixed-line, VoIP, and premium-rate numbers — and you have a parsing problem complex enough that Google maintains a dedicated open-source library to handle it. libphonenumber ships in C++, Java, JavaScript, Swift, Ruby, and Python; this tool uses the JavaScript port, self-hosted from this domain.

E.164 — the international standard

E.164 is the ITU-T recommendation that defines the modern international phone number format. An E.164 number is + followed by the country code, followed by the national subscriber number, with a maximum of 15 digits total. +6591234567 is a Singapore mobile number in E.164. The format has no spaces, dashes, or parentheses. Every SMS gateway, WhatsApp Business API, Twilio integration, Stripe Connect verification, and modern CRM expects numbers in E.164. Storing phone numbers in any other format leads to deduplication failures, SMS delivery problems, and inability to route calls. The rule: store E.164, display national.

ASEAN country codes and carrier prefixes

Quick reference table for the region:

  • Singapore (+65): 8-digit subscriber number. Mobile starts with 8 or 9; fixed-line starts with 6.
  • Malaysia (+60): 7-9 digit subscriber number. Mobile starts with 1 (e.g. 011, 012, 013, 014, 016, 017, 018, 019); fixed-line starts with 2-9 by region.
  • Indonesia (+62): 8-12 digit subscriber number. Mobile starts with 8; fixed-line by region (Jakarta is 21).
  • Thailand (+66): 8-9 digit subscriber number. Mobile starts with 6, 8, or 9; fixed-line by region.
  • Philippines (+63): 10-digit subscriber number. Mobile starts with 9; fixed-line varies by carrier and region.
  • Vietnam (+84): 9-10 digit subscriber number. Mobile starts with 3, 5, 7, 8, or 9 (re-allocated in 2018 — old "0163" numbers became "+8483").

The trunk prefix gotcha

Most countries (including all of ASEAN) have a trunk prefix that you dial domestically but drop when calling internationally. In Singapore, you dial 91234567 (without 0). In Malaysia, you dial 012-345 6789 — the leading 0 is dropped when written internationally as +60 12-345 6789. In Indonesia, the local form 0812 3456 7890 becomes +62 812-3456-7890 internationally. Confusion between these two forms is the single most common phone-number bug in ASEAN integration projects. The tool above normalises everything to E.164 so you don't have to remember which countries strip 0 and which don't.

Why libphonenumber is the standard

Google's libphonenumber project began in 2009 specifically to handle the problem of parsing phone numbers consistently across Google services. It encodes country-specific rules (which prefixes mean mobile vs fixed-line, valid length ranges, format patterns, regional dial codes) for over 240 countries and territories. The data is updated multiple times per year as carriers adjust allocations. The library is now used by WhatsApp, Twilio, Stripe, every major SMS gateway, and every contact-management product. The JavaScript port (libphonenumber-js, 172KB minified) covers the same logic for browser-side parsing — which is what this tool uses, served from this site's own domain, no third-party CDN.

Numbers that look valid but aren't

Three traps: the number is well-formed but assigned to a non-existent prefix (libphonenumber knows current allocations and will flag these); the country code is correct but the trunk-prefix zero is still attached (e.g. +44 0207… should be +44 207…); or the number is a "test" range deliberately reserved for documentation (UK 020 7946 0xxx, US 555-0100 to 555-0199). The parser surfaces these as invalid even when the digit count looks plausible.

10 phone-number facts every developer should know

01

E.164 caps every international phone number at 15 digits — country code plus national number. The longest country codes are 3 digits (e.g. +965 Kuwait), leaving 12 digits for the subscriber number.

02

Singapore has 8-digit phone numbers. The country switched from 7 digits to 8 in April 2002 — landlines were prepended with 6, mobiles with 9.

03

Vietnam reorganised its mobile numbering in 2018, replacing 11-digit numbers (0163-, 0164-, etc.) with 10-digit equivalents (083-, 084-, etc.). Old E.164 numbers are no longer reachable.

04

The international trunk prefix used to dial out varies by country. From most of ASEAN you dial 00 first; from North America it's 011; some legacy GSM still uses + via long-press.

05

Malaysia\'s mobile carriers use different prefix ranges: Maxis tends to use 012/017, Celcom uses 013/019, Digi uses 010/016, U Mobile uses 011/018. Carrier-portability has muddied this since 2014.

06

Indonesia has the world\'s second-largest mobile market by SIM count after India — over 350 million active SIMs across ~280 million people, due to high multi-SIM ownership.

07

The + prefix in E.164 was specified by the ITU in 1997 specifically to replace the country-specific international dial-out codes. It\'s recognised by GSM dialers worldwide.

08

WhatsApp Business API requires numbers in E.164 format with no spaces or dashes. Sending an SMS-style "+65 9123 4567" string causes API rejection — must be +6591234567.

09

Numbers starting with +800 are international toll-free (ITFS). They\'re not country-specific — any country can be the destination. Often used by hotel and airline reservations.

10

libphonenumber\'s metadata file is updated 5-10 times per year as carriers add new ranges or countries renumber. Production systems should refresh the library dependency at least yearly.

Frequently asked questions

E.164 is the ITU-T standard for international phone number format — + followed by country code and subscriber digits, max 15 total. Every SMS gateway, WhatsApp API, Stripe verification, and CRM expects E.164. Storing any other format causes deduplication failures and routing problems.
When converting national format to E.164, yes — most countries (all of ASEAN) drop the leading trunk prefix internationally. Singapore 91234567 becomes +6591234567. Malaysia 0123456789 becomes +60123456789. libphonenumber handles this automatically.
Possible: the number has the right length and digit pattern for its country. Valid: it matches a known assignment range from the country's carrier. Some valid-but-unallocated numbers may be "possible but not valid." For most use cases, valid is the right check.
libphonenumber's getNumberType() returns MOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, VOIP, TOLL_FREE, PREMIUM_RATE, or UNKNOWN. Detection is rule-based on the prefix range. For mobile-only routes (SMS, OTP), filter for MOBILE or FIXED_LINE_OR_MOBILE.
Not reliably. Carrier mobile-number portability (MNP), launched across most ASEAN markets between 2014-2019, lets a number move between carriers without changing the digits. Prefix-based carrier detection now gives only the ORIGINAL allocation, not necessarily the current one.
No. All parsing runs in your browser via self-hosted libphonenumber-js. Your phone numbers never leave the page; nothing is sent to any server. You can verify via your browser's network tab.
E.164 with no spaces, dashes, or parentheses. +6591234567 works; +65 9123 4567 may be rejected depending on the API gateway. The tool above outputs strict E.164 ready to paste.
libphonenumber knows about the change. An old-format Vietnam number like +84163xxxxxxx is now invalid; the equivalent new format starts with +8483. If your customer database contains pre-2018 Vietnamese numbers, you need to refresh contact data.
Without the leading +, the same digits can be valid in multiple countries. 91234567 could be a Singapore mobile, a Hong Kong number, or a partial UK number depending on context. Always include country code in stored data; the dropdown default in the tool is what disambiguates user input.
Self-hosted libphonenumber-js v1.10.62 — the JavaScript port of Google's libphonenumber, the de-facto industry standard for phone parsing. 172KB minified, served from this site's own domain. Updated at least once per year as carriers adjust allocations.

Related News

You may be interested in these recent stories from our newsroom.

View all news →
Advertisement
Pre-footer · AD-W3 728 × 90

75 more free tools

Calculators, converters, security tools — no signup.