Skip to content
DevToolKit

Phone Number Parser & Formatter

Parse and format phone numbers with E.164, international, and national formats plus type detection and validation.

Try:
Powered by libphonenumber

Enter a phone number with or without a country code. The parser uses Google's libphonenumber metadata covering 250+ regions to validate, format, and identify number types including mobile, fixed-line, VoIP, and toll-free.

Was this tool helpful?

How to Use

Parse, validate, and format phone numbers from any country directly in your browser. All processing uses Google's libphonenumber metadata — no numbers are sent to any server.

  1. Select a default country using the dropdown. This determines how numbers without a country code are interpreted. Search by name, code, or calling code.
  2. Enter a phone number in any common format: with or without country code, with parentheses, dashes, dots, or spaces. The parser normalizes all formats automatically.
  3. View the results showing international format, national format, E.164, RFC 3966 URI, detected country, and number type (mobile, fixed-line, VoIP, toll-free, etc.).
  4. Copy any format by clicking the copy button next to each result row. Use E.164 for API integrations, international format for display, and URI format for click-to-call links.
  5. Try quick examples by clicking the country buttons (US, UK, DE, JP, IN) to see how different numbering plans are formatted.

About This Tool

E.164: The Universal Phone Format

E.164 is the ITU-T recommendation that defines the international public telecommunication numbering plan. An E.164 number consists of a plus sign followed by up to 15 digits: the country calling code (1-3 digits) plus the subscriber number. No spaces, dashes, or parentheses. Example: +14155552671 for a US number. This format is required by APIs like Twilio, Stripe, AWS SNS, and most programmable communication platforms because it is globally unique and unambiguous.

How libphonenumber Works

This tool uses libphonenumber-js, a JavaScript port of Google's libphonenumber library. The max metadata bundle (~145 KB) is used to enable type detection. It contains number length rules, area code patterns, and formatting templates for 250+ countries and territories. The metadata is compiled from each country's national numbering plan authority and updated regularly.

Number Type Detection

The parser identifies number types by matching the number against country-specific regex patterns from the metadata. For example, UK mobile numbers start with 07 and are 11 digits, while UK landlines have variable-length area codes (London 020, Birmingham 0121). Detected types include mobile, fixed-line, toll-free, premium-rate, shared-cost, VoIP, personal number, pager, UAN (Universal Access Number), and voicemail.

Validation vs Possibility

The tool distinguishes between two checks. Possible means the number has a plausible length for its country code — it could be a real number but might not match any known number pattern. Valid means the number matches the country's specific numbering plan rules for length and prefix. A number can be possible but not valid if it has the right length but an unassigned area code.

Why Use This Tool

Phone number formatting varies wildly across countries. Without proper parsing, applications break on international inputs. Here are common scenarios:

  • API integration — Twilio, Vonage, AWS SNS, and Firebase require E.164 format. This tool converts any user-typed format to E.164 instantly.
  • Form validation — Validate phone numbers before storing them in your database. The validation checks country-specific rules, not just digit count.
  • VoIP detection — Identify VoIP numbers that may indicate disposable or temporary phone numbers, useful for fraud prevention in authentication systems.
  • International display — Show phone numbers in the correct national format for the user's country, or international format for cross-border communication.
  • Data normalization — Clean up messy phone data from user input, CSV imports, or CRM migrations into consistent E.164 format.

Privacy

All parsing runs entirely in your browser using the bundled libphonenumber metadata. No phone numbers are transmitted to any server. You can verify this in your browser's Network tab — zero requests are made during parsing.

FAQ

What is E.164 format and why does it matter?
E.164 is the ITU-T international telephone numbering plan. It formats numbers as a plus sign followed by up to 15 digits with no spaces or dashes (e.g., +14155552671). APIs like Twilio, Stripe, and AWS SNS require E.164 because it is globally unique and unambiguous.
How does this tool parse phone numbers?
This tool uses Google's libphonenumber library (JavaScript port) to parse, validate, and format phone numbers. It applies country-specific rules for number length, area codes, and formatting patterns covering 250+ regions.
What phone number types can be detected?
The parser identifies mobile, fixed-line, toll-free, premium-rate, shared-cost, VOIP, personal number, pager, UAN (Universal Access Number), and voicemail types using metadata from each country's numbering plan.
Is my phone number data sent to a server?
No. All parsing and validation runs entirely in your browser using JavaScript. No phone numbers are transmitted, stored, or logged. The libphonenumber metadata is bundled in the page — zero network requests are made during parsing.