Phone Number Parser
Parse and format phone numbers in E.164, national, and international formats. Country dropdown defaults to ASEAN.
Phone Number Parser Tool
| Input | Valid | E.164 | National | Country | Type |
|---|
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.
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 on 15 September 2018 — Viettel's 0163 became 033 and VinaPhone's 0123 became 083).
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 is an open-source library for parsing, formatting and validating international phone numbers. It encodes country-specific rules — which prefixes mean mobile or fixed-line, valid lengths, formatting patterns — as metadata that has to be refreshed as countries renumber. This tool uses libphonenumber-js, an independent, smaller JavaScript rewrite built on Google's metadata — its full-metadata build (236 KB), the one that can tell mobile from fixed-line, 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.
Fifteen digits is the ceiling, and Singapore reached eight in two steps
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.
Singapore reached 8 digits in two steps: mobile and pager numbers gained a leading 9 in 1995, fixed lines a leading 6 in March 2002 (IMDA).
On 15 September 2018 Vietnam turned 11-digit mobile numbers into 10-digit ones — Viettel's 0162–0169 became 032–039, VinaPhone's 0123/0124 became 083/084 — with old and new both dialling until 14 November 2018.
The prefix for dialling out of a country varies — 011 from North America, for one — which is why E.164 writes + instead and lets a mobile phone supply the right one.
A mobile prefix names only the operator a range was first allocated to: number portability lets a customer keep the number when changing operator, so the prefix no longer tells you the current one.
An Indonesian number written locally as 0812 3456 7890 drops its trunk 0 to become +62 812-3456-7890 — mobiles there start with 8.
A country code is one to three digits — +1, +65, +965 — so the national part of a 15-digit number can be 12 to 14 digits.
The test ranges exist for a reason: UK drama numbers such as 020 7946 0xxx and US 555-0100 to 555-0199 are reserved so fiction and documentation never ring a real person.
+800 is not a country: it carries Universal International Freephone Numbers, one number reachable free of charge from each country that supports the service.
A parser is only as current as its metadata: countries renumber and open new ranges, so the library has to be refreshed. The copy here is libphonenumber-js 1.10.62, released May 2024.
Frequently asked questions
+ 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.91234567 becomes +6591234567. Malaysia 0123456789 becomes +60123456789. libphonenumber handles this automatically.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.+6591234567 works; +65 9123 4567 may be rejected depending on the API gateway. The tool above outputs strict E.164 ready to paste.+84163xxxxxxx (Viettel) is now invalid; its new form is +8433xxxxxxx, and VinaPhone's +84123… became +8483…. If your customer database contains pre-September-2018 Vietnamese numbers, rewrite the prefix or refresh the contact data.+, 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.Method & sources
How it computes
Parses with self-hosted libphonenumber-js 1.10.62, full-metadata build, against the chosen default country, and returns validity, E.164, national and international formats, the RFC 3966 tel: URI and line type (mobile, fixed line, VoIP…). A bulk mode does the same per line. Runs in the browser.
What this tool implements
- ITU-T E.164 caps an international number at 15 digits; the tool stores that form.
- The vendored bundle was libphonenumber-js's default min build, whose getType() always returns undefined and whose isValid() passed Vietnam's retired +84163… numbers; it is now the max build, which types numbers and rejects them.
- IMDA: mobiles gained a leading 9 in 1995 and fixed lines a 6 in March 2002 (the page said April 2002 for both). Vietnam's ministry: from 15 Sep 2018 Viettel's 0163 became 033 and VinaPhone's 0123 became 083 (the page said 0163 became 083).
Sources
- Info-communications Development Authority of Singapore. Annex 1 factsheet: History of Mobile Phones & Numbering in Singapore. https://www.imda.gov.sg/-/media/imda/files/inner/archive/news-and…
- Vietnam Ministry of Science and Technology. Từ ngày 15/9, Hà Nội chuyển đổi mã mạng thuê bao di động 11 số về 10 số. https://mst.gov.vn/tu-ngay-159-ha-noi-chuyen-doi-ma-mang-thue-bao…
What can make this go out of date
- libphonenumber-js 1.10.62 (released 4 May 2024), self-hosted, whose bundled metadata decides validity and line type; a number range opened after that release may not validate until the library is updated.
Pick up where you left off
Stored only in this browser — never sent to our servers.