CruxDevCruxDev Tools Prompts
text Utility • Zero-Server Privacy • 100% Client-Side

Phone Number Parser & Formatter

Parse and format international phone numbers with country detection, E.164, national, and RFC 3966 tel: URI output formats.

Overview

Parses a phone number, detects the country from its calling code, and formats it as E.164, international and RFC 3966 tel: URI forms. Enter a number in almost any shape — spaces, dashes, parentheses — and get clean, machine-readable versions you can paste into a database or a click-to-call link.

How It Works

Type or paste a number into the input box; the sample +14155552671 shows the expected shape. The tool strips everything except digits and a leading plus, matches the country code from a built-in table (US/Canada +1, UK +44, India +91, Germany +49, France +33, Japan +81), and shows four result cards: the detected country, the E.164 form (plus sign and digits, no punctuation), the international form with a space after the code, and the tel: URI. A 10-digit national number is additionally grouped as (NNN) NNN-NNNN. Everything updates live and each value is click-to-copy.

Step-by-Step Usage Guide

  1. Paste the number with its country code — the + prefix tells the parser it is international.
  2. Check the Country card: one of six supported countries, or Unknown if the code is outside the table.
  3. Copy the E.164 value for APIs and databases, or the tel: URI for click-to-call links.
  4. If the number shows as Unknown, verify it includes the country code and no extra leading digits.

Technical Specifications & Standards

E.164 is the ITU-T standard for international telephone numbers: a plus sign, a country code of one to three digits, and a national significant number, digits only, fifteen digits maximum — the format every messaging and voice API asks for. The tool emits E.164 by concatenating all digits after stripping punctuation, which satisfies the format's shape. Country detection is a straightforward prefix match over six codes, ordered so +1 is tested first; that small table is the honest limitation — a +1 match covers the whole North American Numbering Plan (US, Canada and the Caribbean +1 states alike, all reported as one), countries outside the six are labelled Unknown, and a number stored without its country code cannot be identified at all. The (NNN) NNN-NNNN grouping applies only when exactly ten national digits remain, which is the North American pattern; other countries' variable-length numbers are left as a plain digit run. RFC 3966 output wraps the E.164 value in tel: for use in href attributes.

Targeted Use Cases

  • Normalizing user-entered phone numbers into E.164 before storing them for SMS or voice APIs.
  • Building tel: links for a contact page so mobile browsers open the dialer with the right number.
  • Cleaning a CRM import where the same number was typed a dozen different ways.
  • Teaching or verifying the E.164 structure: plus, country code, national number, fifteen digits max.

Notes & Gotchas

  • Always store numbers in E.164; keep the pretty (NNN) NNN-NNNN grouping as a display-only concern.
  • Include the plus and country code in your input — without them, country detection cannot work reliably.
  • Only ten-digit national numbers get the US-style grouping; other lengths are intentionally left as plain digits.
  • For production validation of arbitrary countries, use a full numbering-plan library; this tool covers six countries by design.

Frequently Asked Questions

What is E.164 and why does it matter?

It is the ITU-T international phone number standard: a leading plus, a country code, then the national number, digits only, at most fifteen digits in total. Virtually every telephony and messaging API requires this exact form, which is why the tool prints it as the primary output.

Which countries are detected?

Six: the +1 North American region (reported as United States / Canada), the United Kingdom (+44), India (+91), Germany (+49), France (+33) and Japan (+81). Numbers with other country codes still get E.164 formatting but the country shows as Unknown.

Why is my number not grouped as (NNN) NNN-NNNN?

That grouping only applies when the national part is exactly ten digits, the North American pattern. Other countries use variable-length numbers, so the tool leaves them as a plain digit run instead of guessing a wrong grouping.

What is the tel: URI for?

RFC 3966 defines tel: as the URI scheme for phone numbers in links. Put it in an anchor's href (tel:+14155552671) and mobile browsers open the dialer pre-filled with the number in its unambiguous international form.