E.164 is the international numbering standard published by the ITU. An E.164 number is a +, the country code (1 to 3 digits) and the subscriber number, with no spaces, dashes, brackets or trunk prefix, and at most 15 digits in total.
+ 44 2079460958
│ │ └─ national number without the leading 0 (trunk prefix)
│ └─ country code (United Kingdom)
└─ plus sign
E.164 examples by country
| Country | Written locally | E.164 |
|---|---|---|
| United States | (206) 922-0880 | +12069220880 |
| United Kingdom | 020 7946 0958 | +442079460958 |
| Germany | 030 901820 | +4930901820 |
| India | 098765 43210 | +919876543210 |
| Nigeria | 0803 123 4567 | +2348031234567 |
| Australia | (02) 9876 5432 | +61298765432 |
| France | 01 23 45 67 89 | +33123456789 |
| Brazil | (11) 91234-5678 | +5511912345678 |
| Mexico | 55 1234 5678 | +525512345678 |
| Japan | 03-1234-5678 | +81312345678 |
Look up the code and trunk prefix of any country in the country code list.
How to convert a number to E.164
- Remove everything that is not a digit, except a leading
+. - Replace a leading
00(international prefix) with+. - If there is no
+, the number is national: remove the trunk prefix (usually0; nothing in the US) and add+and the country code. - Check the length: at most 15 digits after the
+.
Step 3 is the hard part, because trunk prefixes and number lengths differ by country. Italy, for example, keeps its leading 0 (+39 06 …). That is why production code uses libphonenumber or an API instead of string manipulation:
import { parsePhoneNumber } from "libphonenumber-js";
parsePhoneNumber("020 7946 0958", "GB").number; // "+442079460958"
Or convert a whole list with the free phone number formatter.
Validating E.164 numbers
A regex only checks the shape:
^\+[1-9]\d{1,14}$
+15555555555 passes the regex but is not a real number. To check that a number is actually in use in the country’s numbering plan, use the phone number validator or the numlookupapi API, which returns valid, line_type, carrier and e164_format.
Why APIs require E.164
SMS and voice providers such as Twilio, Vonage, MessageBird and AWS SNS route messages by country code. A national number like 07400 123456 is ambiguous without a country, so these APIs only accept E.164. Normalising numbers when they are entered (in your sign-up form or import) avoids failed messages later.