E.164 Phone Number Formatter
Convert messy phone numbers to E.164 format (+1234567890). Country code selector, batch mode, and reference table.
E.164 country calling codes — click any row to copy the code.
| Country | Code | Example Number | Digits |
|---|
How to Use the Phone Number Formatter
- Select your country — choose the country code from the dropdown. This prefix will be added to numbers that do not already include a + country code.
- Enter a phone number — paste any formatted phone number: (555) 123-4567, 555-123-4567, 555.123.4567, or +1 (555) 123-4567. The formatter strips all punctuation.
- View E.164 output — the result appears instantly in E.164 format: +15551234567.
- Batch mode — paste one number per line to format a list at once. Invalid numbers are flagged in red.
- Reference tab — search the full table of E.164 country calling codes.
What is E.164 Phone Number Format?
E.164 is the international standard telephone numbering plan maintained by the ITU-T (International Telecommunication Union). The standard ensures that every phone number in the world can be uniquely identified and dialed using a consistent notation:
- Starts with a
+sign - Followed by the country code (1–3 digits, e.g., +1 for USA/Canada, +44 for UK, +49 for Germany)
- Followed by the national subscriber number (up to 12 digits)
- Maximum 15 digits total (excluding the +)
- No spaces, dashes, or parentheses — digits only after the +
Why E.164 Matters for Developers
If you're building any application that sends SMS messages, makes phone calls, or stores user contact information, E.164 is the canonical format you should store and transmit. Every major telephony API requires it:
- Twilio — all To/From numbers in the REST API must be E.164
- AWS SNS — phone numbers for SMS subscriptions must be E.164
- WhatsApp Business API — E.164 without the + for phone number IDs
- Vonage (Nexmo) — E.164 without the + (just digits with country code first)
- Firebase Auth — phone number sign-in uses E.164
- Stripe — customer phone numbers are stored in E.164
How the Formatting Algorithm Works
This tool applies a simple, deterministic algorithm to format numbers:
- Detect whether the input starts with
+— if so, preserve it and strip all non-digits from the remainder. - If the input starts with
00, treat it as an international prefix (replace00with+) — common in European dialing. - Otherwise, strip all non-digit characters and prepend the selected country code (e.g.,
+1for US). - Validate the final length: must be between 7 and 15 digits after the
+.
Common Phone Number Formats and Their E.164 Equivalents
Phone numbers appear in dozens of local formats depending on region and convention. Here are common formats that this tool normalizes:
- US NANP format: (555) 123-4567 → +15551234567
- US with country code: +1 (555) 123-4567 → +15551234567
- UK format: 07911 123456 → +447911123456 (drop leading 0)
- German format: 0049 30 12345678 → +493012345678
- French format: 01 23 45 67 89 → +33123456789
- Australian format: (02) 1234 5678 → +61212345678
- Indian format: +91 98765 43210 → +919876543210
Storing Phone Numbers in Databases
Always store phone numbers in E.164 format in your database. Use a VARCHAR(20) column — 20 characters is enough for the + and up to 15 digits, with a small buffer. Never store numbers as integers (leading zeros are lost, and some country codes produce very large numbers). E.164 storage makes it trivial to deduplicate user records, match numbers across international formats, and pass numbers directly to telephony APIs without transformation. When displaying numbers to users, you can re-format E.164 into a local format using a library like libphonenumber.
E.164 vs. Other Phone Formats
While E.164 is the international standard, you may encounter other formats:
- National format — omits the country code. Example: (555) 123-4567 in the US. Ambiguous without knowing the country.
- International format — includes the country code with a +. Example: +1 555-123-4567. This is E.164 with formatting.
- IDD format — uses the International Direct Dialing prefix instead of +. Example: 001 555 123 4567 (for calls from the UK to the US). Some regions use 00, others use 011.
- RFC 3966 — the URI scheme for phone numbers, e.g., tel:+15551234567. Used in HTML href="tel:" links and SIP/VoIP systems.