2FA - Formatting International Phone Numbers

Formatting International Phone Numbers

Calling or messaging to/from a Twilio phone number may require different formatting than calling or messaging to/from a standard local or mobile phone number. Depending on the direction and use case, you may need to use an international calling prefix, add an extra digit, or use E.164 formatting. This guide explains what type of phone number formatting to use with Twilio.

Recent dialing changes

Here is the latest phone number dialing changes. If you have Twilio phone numbers from one of these countries, and/or dial out to them, please click the below link to review the details of the change: 

Calling or Messaging from a Twilio phone number (E.164 formatting)

Twilio recommends using E.164 formatting for all To and From phone numbers in API requests and TwiML scripts. This is an internationally-recognized standard phone number format that will help to ensure deliverability of calls and SMS messages across the globe.

Notice: Short Code messaging numbers do not require a plus sign or country code. For more information

How does E.164 work?

E.164 phone number formatting entails the following:

  1. A + (plus) sign (replacing the International Call Prefix like 011)
  2. International Country Calling code
  3. Local Area code
  4. Local Phone number

For example, here’s a US-based number in standard local formatting: (415) 555-2671

US_Plain.png

Here’s the same phone number in E.164 formatting: +14155552671

US_e164.png

E.164 Mobile Numbers

In a number of countries, local dialing may require the addition of a '0' in front of the subscriber number. With E.164 formatting, this '0' must usually be removed.

For example, here’s a UK-based number in standard local formatting: 020 7183 8750

UK_Plain.png

Here’s the same phone number in E.164 formatting: +442071838750

UK_e164.png

More help with E.164 Formatting

If you need help determining the correct E.164 formatting for a phone number, consider using the Twilio Lookup API. The Lookup API can help validate any phone number to make sure it is correctly formatted to send or receive calls. Lookup also offers additional options for searching Caller ID name and Carrier information. 

Calling or Messaging to a Twilio phone number (local formatting)

For receiving communications, Twilio phone numbers generally follow the same rules as any other local number. Domestic calls and messages to Twilio phone numbers can be dialed just like any standard number. International calls or messages to Twilio phone numbers may require a few more hoops but can be dialed just like any standard number from the destination country.

  • Domestic example: Calling to a US-based Twilio phone number from a US-based landline or mobile phone uses the standard 10-digit dialing plan (3 digit area code followed by 7 digits local number).
  • International example: Calling to a UK-based Twilio phone number from a US-based landline or mobile phone requires the US' international direct dialing prefix (011 or a plus on your mobile phone), followed by the UK's country code (44), and then the telephone number.

Just like when calling from a mobile or landline, international dialing rules can vary depending on the caller's location and the call destination.