
Share:
Alvaro is a former member of the Vonage Team. He was a developer advocate at Vonage, focusing on Network APIs. Passionate about Developer Experience, APIs, and Open Source. Outside work, you can often find him exploring comic shops, attending sci-fi and horror festivals or crafting stuff with those renowned tiny plastic building blocks.
What Is E.164 Format?
Time to read: 3 minutes
This article was updated in June 2026
E.164 is an international standard that defines a phone number scheme that ensures each user worldwide has a unique phone number and allows them to connect to each other for phone calls and messages. As a result, the standard simplifies international calls and reduces the risk of dialing the wrong number.
According to the E.164 standard, there are different ways of specifying a phone number: geographical areas, global services, networks, etc. This article will use the standard representation for geographical areas, as this is the format used in the Vonage APIs.
The E.164 Format
E.164 phone numbers contain a maximum of 15 digits, excluding the leading + sign, and follows the format:
[country code] [national destination code] [subscriber number]
where:
Country Code (CC) corresponds with the international country calling codes (1 to 3 digits). By convention, international telephone numbers are represented by prefixing the country code with a plus sign (+).
National Destination Code (NDC) identifies a specific area, region, or network within the country.
Subscriber Number (SN) is the individual phone number assigned to the user. The length of the NDC and the SN must be 15 minus the length of the CC.
Examples
United States
The phone number 212 123 1234 can be represented using E.164 format as +12121231234, where:
+1 is the country code for the US.
212 is the NDC.
1231234 is the subscriber number.
United Kingdom
The phone number 020 1234 5678 can be represented using E.164 format as +442012345678, where:
+44 is the country code for the UK.
20 is the NDC for London.
12345678 is the subscriber number.
Spain
The phone number 91 234 5678 can be represented in E.164 as +34912345678, where:
+34 is the country code for Spain.
91 is the NDC for Madrid.
2345678 is the subscriber number.
Germany
The phone number 030 12345678 can be represented in E.164 as +493012345678, where:
+49 is the country code for Germany.
30 is the NDC for Berlin.
12345678 is the subscriber number.
Why Is E.164 Important?
Many of our APIs use phone numbers following the E.164 standard. In particular, Network APIs expect API consumers to follow this format when calling some endpoints.
For example, the Identity Insights API accepts the subscriber’s phone number in E.164 format. It returns information such as whether the SIM was recently linked to that number, as well as the original and current carrier.
How Can We Validate an E.164 Phone Number?
As developers, it is essential to ensure the user's input is correct. This includes sanitizing, validating, and confirming that the phone number follows the E.164 format before making any API call. This will save us time and bandwidth.
One solution is to use one of the existing libraries to help validate phone numbers.
You might want to check the phone library if you are coding in JavaScript. The following example shows the validation of a phone number:
const {phone} = require('phone');
phone('+1(817) 569-8900', {country: 'USA'});
/*
{ isValid: true,
phoneNumber: '+18175698900',
countryIso2: 'US',
countryIso3: 'USA',
countryCode: '+1'
}
/*If you are a Python programmer, phonenumbers is your library. Here is an example:
import phonenumbers
my_number = phonenumbers.parse("+34911234567", "ES")
print(phonenumbers.is_valid_number(my_number)) # TrueAs an alternative, you could build your own validator using regular expressions. Depending on the regex language, something along the lines of:
^\+?[1-9]\d{1,14}$The following Python code uses that regular expression to validate some input data:
import re
def validate_e164(phone_number):
pattern = r'^\+?[1-9]\d{1,14}$'
return bool(re.match(pattern, phone_number))
# Test the function
test_numbers = [
"+14155552671", # Valid E.164 number (US)
"+442071838750", # Valid E.164 number (UK)
"+493012345678", # Valid E.164 number (Germany)
"+34916543210", # Valid E.164 number (Spain)
"1234567890", # Invalid (missing +)
"+1234567890123456" # Invalid (too long)
]
for number in test_numbers:
print(f"{number}: {validate_e164(number)}") Get in Touch!
In this article, we explored the E.164 phone number format, its structure, and several approaches to validating phone numbers before sending requests to Vonage APIs. As a next step, you might explore the Vonage Identity Insights API or other Network APIs that rely on E.164-formatted numbers.
Have a question or want to share what you're building?
Subscribe to the Developer Newsletter
Follow us on X (formerly Twitter) for updates
Watch tutorials on our YouTube channel
Connect with us on the Vonage Developer page on LinkedIn
Stay connected and keep up with the latest developer news, tips, and events.
Share:
Alvaro is a former member of the Vonage Team. He was a developer advocate at Vonage, focusing on Network APIs. Passionate about Developer Experience, APIs, and Open Source. Outside work, you can often find him exploring comic shops, attending sci-fi and horror festivals or crafting stuff with those renowned tiny plastic building blocks.