Skip to main content
← Back to blog
Phone Number Formats7 min read

How to Convert a Phone Number to E.164 Format (with Examples) — 2026 Guide

E.164 Format Converter

Default country (used when the number has no “+”): change it in the country selector at the top of the page.

Privacy: conversion runs entirely in your browser using libphonenumber-js. Numbers never leave your device. Feedback?

E.164 is the only phone-number format that every modern API agrees on — Twilio, WhatsApp, Stripe, Salesforce, HubSpot. If you are getting "invalid phone number" errors from any of those, the fix is almost always to convert your numbers to E.164 first. This guide covers the conversion rules, country-by-country worked examples, and how to bulk-convert lists without writing custom regex for every locale.

The E.164 converter at the top of this page does the conversion automatically — paste a single number for the multi-format breakdown, or switch to bulk mode to convert a whole list. If you need the technical background on what E.164 actually is, see What is E.164? The ITU Phone Number Standard Explained.

The Three-Step Rule

Converting any phone number to E.164 is three steps:

  1. Determine the country code and prepend it as +CC
  2. Drop the trunk prefix (the leading 0 many countries use for domestic dialling) — only some countries have one
  3. Strip every non-digit — spaces, dashes, parentheses, dots, slashes — leaving digits only after the +

That is the whole algorithm. The complications are step 1 (when no country code is given) and step 2 (which countries use a trunk prefix and which do not).

Worked Examples by Country

United States / Canada

(555) 123-4567        →  +15551234567
555-123-4567          →  +15551234567
1-555-123-4567        →  +15551234567
+1 (555) 123-4567     →  +15551234567

Rules: Country code +1. No trunk prefix to drop — North American numbers are always exactly 10 digits (3-digit area code + 7-digit subscriber). If a leading 1 is present, treat it as the country code and prepend +.

United Kingdom

07911 123456          →  +447911123456    (mobile)
020 7946 0958         →  +442079460958    (London landline)
0800 100 100          →  +448001001000    (toll-free, hypothetical)
+44 7911 123456       →  +447911123456

Rules: Country code +44. Drop the leading 0 (the UK trunk prefix). UK mobiles start with 07, so the 0 is dropped and the rest follows the country code: 07911… → +447911….

Germany

030 12345678          →  +493012345678
0151 12345678         →  +4915112345678   (mobile)
+49 30 12345678       →  +493012345678

Rules: Country code +49. Drop the leading 0. NDC length varies (Berlin is 30, Munich is 89, mobile carriers use 3-digit codes like 151, 170).

France

01 23 45 67 89        →  +33123456789
06 12 34 56 78        →  +33612345678     (mobile)
+33 1 23 45 67 89     →  +33123456789

Rules: Country code +33. Drop the leading 0. French numbers after the trunk prefix are always 9 digits.

India

98765 43210           →  +919876543210    (mobile)
011 2345 6789         →  +911123456789    (Delhi landline)
+91 98765 43210       →  +919876543210

Rules: Country code +91. Mobile numbers have no trunk prefix in modern Indian numbering. Landlines use a leading 0 that is dropped. Mobiles are exactly 10 digits.

China

138 1234 5678         →  +8613812345678   (mobile)
010 1234 5678         →  +861012345678    (Beijing landline)
+86 138 1234 5678     →  +8613812345678

Rules: Country code +86. Drop the leading 0 for landlines. Mobile numbers in mainland China start with 1 and are always 11 digits.

Brazil

(11) 91234-5678       →  +5511912345678   (São Paulo mobile)
(21) 2345-6789        →  +552123456789    (Rio landline)
+55 11 91234-5678     →  +5511912345678

Rules: Country code +55. No leading 0 to drop in modern Brazilian dialling, but the parentheses around the area code (DDD) must be stripped. Mobile numbers added a leading 9 in front of the 8-digit subscriber number — total length 11 digits after the country code.

Japan

03-1234-5678          →  +81312345678     (Tokyo landline)
090-1234-5678         →  +819012345678    (mobile)
+81 3 1234 5678       →  +81312345678

Rules: Country code +81. Drop the leading 0. Mobile carriers use 3-digit prefixes (090, 080, 070), all of which lose the leading 0 in international format.

Spain

612 345 678           →  +34612345678     (mobile)
91 123 45 67          →  +34911234567     (Madrid landline)
+34 612 345 678       →  +34612345678

Rules: Country code +34. No trunk prefix — Spain dropped the leading 0 in the late 1990s. Spanish numbers are always exactly 9 digits after the country code.

Italy

333 123 4567          →  +393331234567    (mobile)
06 1234567            →  +3906123 4567    → +3906 1234567 → +391234567 ✗
06 1234567 (Rome)     →  +39061234567     ✓
+39 333 123 4567      →  +393331234567

Rules: Country code +39. Italy is unusual — landline numbers keep the leading 0 in the international form (not dropped). So Rome 06 1234567 becomes +390612345678, with the 0 retained. This trips up automatic conversion tools that assume "drop the leading 0" universally.

United Arab Emirates

050 123 4567          →  +971501234567    (mobile)
04 123 4567           →  +97141234567     (Dubai landline)
+971 50 123 4567      →  +971501234567

Rules: Country code +971. Drop the leading 0. UAE mobiles use 2-digit prefixes (50, 52, 54, 55, 56, 58).

The Trunk Prefix Catch (Why "Just Drop the Leading Zero" Sometimes Fails)

The leading 0 is the trunk prefix — used for domestic long-distance dialling. Most countries drop it in international format. The exceptions:

  • Italy — keeps the leading 0 for landlines (mobile numbers do not have one)
  • Côte d'Ivoire — kept the 0 in the 2021 renumbering
  • Some Pacific island nations — variable

If you are bulk-converting and you do not know the country, do not roll your own logic — use libphonenumber. It has the country-specific exceptions baked in.

Converting 00 and 011 Prefixes

Numbers stored from manual data entry sometimes carry the international direct dialling (IDD) prefix instead of +:

| Region | IDD prefix | Example | E.164 | | --------------- | ---------- | ---------------- | --------------------- | | Most of Europe | 00 | 00447911123456 | +447911123456 | | North America | 011 | 01144791112345 | +447911123456 | | Russia, Belarus | 810 | 8101055512345 | +15551234567 (e.g.) | | Japan | 010 | 01044791112345 | +447911123456 |

Replace the IDD with +. If the IDD is 011 or 010, drop those three digits and prepend +. The converter does this automatically when it detects an IDD-prefixed number.

Bulk Conversion

For lists with more than ~10 numbers, manual conversion is error-prone. Two reliable approaches:

1. The bulk converter on this page

Toggle the converter at the top of this page to Bulk mode, paste your list (one number per line — country codes can be mixed), and copy the E.164 column. Invalid numbers are highlighted so you can fix them in place. Everything runs client-side — no upload, no signup.

2. libphonenumber in code

For automated pipelines:

// JavaScript
import { parsePhoneNumberFromString } from 'libphonenumber-js';

function toE164(input, defaultCountry = 'US') {
  const parsed = parsePhoneNumberFromString(input, defaultCountry);
  if (!parsed?.isValid()) return null;
  return parsed.format('E.164');
}

toE164('(555) 123-4567'); // '+15551234567'
toE164('07911 123456', 'GB'); // '+447911123456'
toE164('+33 1 23 45 67 89'); // '+33123456789'
# Python
import phonenumbers

def to_e164(input_str, default_country='US'):
    parsed = phonenumbers.parse(input_str, default_country)
    if not phonenumbers.is_valid_number(parsed):
        return None
    return phonenumbers.format_number(parsed, phonenumbers.PhoneNumberFormat.E164)

to_e164('(555) 123-4567')                     # '+15551234567'
to_e164('07911 123456', 'GB')                 # '+447911123456'

Both libraries handle:

  • Country detection from + prefix
  • Trunk-prefix dropping per country
  • Separator stripping
  • Validation against ITU country code allocations
  • The Italian leading-zero exception

If you need the result in your codebase, libphonenumber is the right tool. For one-off conversions or sharing a converted list with a non-technical teammate, the on-page converter is faster.

Excel / Google Sheets

Neither has a built-in E.164 function. Two workarounds:

  1. Paste-into-converter — copy the column from your sheet, paste into the bulk converter on this page, copy the E.164 column back into the sheet. Fastest for one-time work.
  2. Apps Script + libphonenumber — for repeated workflows, install a libphonenumber-based custom function. Sample Apps Script in the bulk conversion guide.

Common Errors and Fixes

| Symptom | Cause | Fix | | --------------------------------------------- | ------------------------------ | -------------------------------------- | | API returns invalid phone number | Number missing + prefix | Prepend +CC | | WhatsApp wa.me link does not open chat | Included + in URL | Drop the + for wa.me/, keep digits | | Twilio fails with Phone number is not valid | Leading 0 not dropped (UK, DE) | Strip the trunk prefix | | Italian landline rejected | Leading 0 dropped | Italian landlines keep the 0 | | Number with 00 prefix flagged invalid | IDD prefix instead of + | Replace 00 with + | | 16-digit "E.164" rejected | Exceeded 15-digit max | Likely an extra digit pasted in |

Validation Before Conversion

If you are converting to push to a downstream system, validate first:

const parsed = parsePhoneNumberFromString(input, 'US');
if (!parsed?.isValid()) {
  // Reject before sending to the API — saves an API call
}

isValid() checks structural validity and that the NDC + SN combination matches a real allocation in the country. Cheaper than letting the downstream API reject.

Related Guides

Bottom Line

Three steps: prepend +CC, drop the trunk prefix where applicable, strip the separators. The bulk converter on this page does all three for any country, including the Italian landline edge case and the IDD-prefix replacement. For automated pipelines, libphonenumber is the canonical implementation. Either way, store with the + and digits only after — that is what every modern phone-number API expects.