When making calls with Twilio, we recommend E.164 number formatting for all phone numbers both in the ‘to’ and ‘from’ fields. This format is the internationally-standardized format for all phone numbers, and it includes all the relevant information to route calls and SMS messages globally. E.164 formatted phone numbers can have a maximum of fifteen digits, and are usually written as follows:
[+][country code][area code][subscriber number]
For example, to convert a US phone number (415) 555-1234 to E.164 formatting, you'll need to add the + prefix and the country code (1 for the U.S. and Canada) in front of the standard area code and phone number. This gives us +14155551234
.
In other countries and locales like the U.K., a leading zero must be removed prior to adding the plus sign and country code. For more information and examples, please see Formatting International Phone Numbers.
Notice: Calling phone numbers that are not formatted in E.164 may work, but it depends on the phone or handset that is being used as well as the carrier from which the call or SMS is being originated. To ensure full compatibility, we recommend only using E.164 formatted phone numbers.