Phone parser and formatter — Guide

Parse, validate and format phone numbers. Get information about the phone number, like the country code, type, etc.

What it is and when to use it

Parse a phone number into its structured form and reformat it between national, international and E.164 notation. The engine is libphonenumber (the same library behind Android's number handling), so you get country code, number type and validity based on real numbering plans rather than a regex guess.

Parses a phone number, identifying the country code, area code and number type, and formats it to a standard form.

How to use it

  1. Enter the phone number (including the country code improves accuracy)
  2. Read the parsed details
  3. Copy the formatted number

A worked example

Fill in a sample number

+86 138 0013 8000

Copy this into the tool, or open Phone parser and formatter

Things that trip people up

  • A number without a country code can only be parsed against a default region and is easily misidentified

Questions people ask

What is E.164 and why does everyone ask for it?
It is the unambiguous international format — plus sign, country code, subscriber number, no spaces (e.g. +442071838750). APIs and databases prefer it because the same number has many human spellings but exactly one E.164 form.
Why does the result change when I add a country code?
Without one, the parser must assume a default country for local notation; with one, the number is interpreted globally. Ambiguous short numbers can legitimately parse differently — always pass the country you mean.
What does the "type" field mean?
It classifies the number as mobile, fixed line, toll-free, premium rate and so on, based on the country's numbering plan. Useful for filtering out fax lines or blocking premium numbers before dialling.

Next steps

Open the Phone parser and formatter tool

Spotted something wrong on this page? Tell us via Contact Us