Phone parser and formatter

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

About Phone parser and formatter

Parses a phone number with Google's libphonenumber rules: tells you the country and calling code, whether the number is valid or merely possible, its type (mobile, fixed line, toll-free...), and formats it in international, national, E.164 and RFC 3966 styles.

When you would use it

How to use it

  1. Choose the default country, used when the number has no + prefix; it is preselected from your browser language.
  2. Type the number in any common form (spaces, dashes, parentheses, leading 0 or +).
  3. Read the country, validity, type and the four formats, and copy the one you need.

Things worth knowing

Frequently asked questions

Which format should I store in a database?
E.164: a plus sign, the country code and the national number with no spaces (+886912345678). It is unambiguous and what SMS and telephony APIs expect.
Why is a number I can call reported as invalid?
Either the default country is wrong for a number without +, or the number belongs to a range the library does not yet know. Try adding the country code with + to rule out the first cause.

All the tools