Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

What is E.164?


E.164 is the international telephone numbering plan that ensures each device on the PSTN has globally unique number.

This number allows phone calls and text messages can be correctly routed to individual phones in different countries. E.164 numbers are formatted [+] [country code] [subscriber number including area code] and can have a maximum of fifteen digits.


Examples of E.164 Numbers

examples-of-e164-numbers page anchor
E.164 FormatCountry CodeCountrySubscriber Number
+141555526711US4155552671
+44207183875044GB2071838750
+55115525632555BR1155256325

Processing international phone number input fields with a country code

processing-international-phone-number-input-fields-with-a-country-code page anchor
international phone number input.
phone number input translated to e.164 format.

Learn more about how to build international phone number input in HTML and JavaScript on the Twilio blog(link takes you to an external page), including how to transform the phone number input into E.164 format.


How to Validate a Phone Number

how-to-validate-a-phone-number page anchor

A simple and robust way to validate phone numbers is to use the Twilio Lookup API to perform phone number validation and formatting without the need for RegEx(link takes you to an external page). You can also find international telephone input and validation in the Twilio Code Exchange(link takes you to an external page).

invalid phone number validation.

Reasons to programmatically verify that a string is in a valid E.164 phone number include:

  • Preventing fraud when capturing a user's phone number in a form
  • Ensuring deliverability when sending a Twilio SMS or voice call
  • Validating previously collected phone numbers in a database

RegEx Matching for E.164

regex-matching-for-e164 page anchor

According to the official ITU E.164 recommendation(link takes you to an external page) the format must be a number up to fifteen digits in length starting with a '+'. You can also exclude 0 as the first character since there are no country codes(link takes you to an external page) that start with 0. Here is a sample regular expression:

^\+[1-9]\d{1,14}$

However, this will also match numbers that are not a valid phone number. We recommend using the Twilio Lookup API for comprehensive phone number validation.


Rate this page: