Blog / Format
What is E.164, and why your CRM keeps asking for it
If you've ever imported contacts into a CRM or wired up an SMS API, you've seen the term E.164 (sometimes written E164 or e164). It's a phone-number format. It looks like this: +14155552671. Once you understand it, half the import errors people run into stop happening.
The format, in one paragraph
E.164 is a standard from the International Telecommunication Union (specifically ITU-T Recommendation E.164). It says every phone number in the world can be uniquely written as a leading +, followed by 1–3 digits of country code, followed by the national subscriber number, with a maximum total length of 15 digits and no spaces, dashes, parens, or other separators. So +14155552671: +, country code 1 (US/Canada), national number 4155552671.
Why the format exists
Phone numbers existed for ~100 years before the internet, and every country grew its own way of writing them. 020 7946 0958 in the UK, (415) 555-2671 in the US, 0234 5678901 in some European countries. These local formats are fine for humans but a nightmare for software. Two problems they cause:
- You can't tell the country. Is
0234 5678901Italy or Nigeria? Depends on context that the number itself doesn't carry. - The same person looks different across systems. Your iPhone stores it one way, your CRM another, your messaging API a third. Dedup breaks.
E.164 fixes both: every number unambiguously identifies one country, and there's exactly one valid representation per number, so dedup just works.
Why your CRM and SMS provider demand it
Three reasons:
- Routing. When you send an SMS, the provider needs to know which country's network to hand it to. The country code in the E.164 prefix is the routing key.
- Billing. SMS rates differ wildly by country. Twilio's per-country pricing shows it: a US SMS is fractions of a cent; some emerging markets are 10x that. Without E.164, the provider can't price the message.
- Deduplication. A CRM that stores phone numbers in mixed formats can't reliably tell "John 415-555-2671" and "John (415) 555-2671" are the same person.
Common mistakes
Forgetting the leading +
Some systems accept 14155552671 without the + and infer it. Many don't. Google's libphonenumber treats the + as part of the format. If you're producing E.164 by code, always include it.
Confusing trunk prefixes with country codes
The UK trunk prefix is 0 (you dial 020 7946 0958 from inside the UK). The country code is +44. The full international form is +44 20 7946 0958. The 0 drops when you go international. New users sometimes write +44 020 7946 0958, which is invalid because it's a trunk prefix where the country code already implies the national network.
Treating +1 as US-only
+1 is the country code for the entire North American Numbering Plan: US, Canada, plus the Bahamas, Bermuda, Jamaica, Trinidad and Tobago, and a dozen other Caribbean countries. The actual country is determined by the area code (NPA) — +1 416 is Toronto, Canada; +1 415 is San Francisco, US. If your CRM cares about country specifically, you need NPA-aware logic, not just the country-code prefix.
Storing numbers as integers
Don't. The leading + is significant, and parsing back from an integer loses it. Treat phone numbers as strings, always.
How to convert your existing data to E.164
The hard part is that "the number 415-555-2671 with no country code" can't be converted to E.164 without knowing where that contact is. Two approaches:
- If you know the contact's country (from address, area code, or the SIM that originally captured the number), prepend the country code and reformat. Pluck does this automatically: it reads each contact's country from the phone-number prefix when present, falls back to your SIM/locale country when the number is local-only, and produces E.164 on export.
- If you don't know, you have to guess (use the most common country in your address book) or accept that some numbers will be unconvertible.
What about emergency numbers and short codes?
Numbers like 911, 999, 112, and SMS short codes (e.g. 22122) are not E.164. They're country-internal codes. If you have any in your contacts, they should be flagged separately, not formatted as international numbers.
Convert your contacts to E.164 in one tap. $4.99 once.