---
title: "E.164 Phone Number Format: How to Convert and Validate"
description: "E.164 phone number format explained: the rules, how to convert local numbers with a table of examples, WhatsApp and SMS API needs, regex and libphonenumber."
canonical: "https://omnichannels.ai/blog/e164-phone-number-format/"
language: "en"
updated: "2026-11-08"
publisher: "BroadNet Technologies"
brand: "OmniChannels.ai"
category: "integration"
primaryQuery: "e164 format"
keywords: ["international phone number format", "e.164 phone number", "convert phone number to e164", "e164 regex validation", "libphonenumber", "excel phone numbers leading zero", "whatsapp phone number format"]
published: "2026-11-08"
author: "OmniChannels.ai Editorial Team"
reviewer: "BroadNet Messaging Solutions Team"
readingMinutes: 9
answer: "E.164 is the ITU-T international numbering plan. An E.164 number is written with a leading plus sign, the country code and the national number, with at most 15 digits and no spaces or punctuation, for example +971501234567. To convert a local number, drop the national trunk prefix (usually 0) where the country uses one, add the plus and the country code, and remove spaces and brackets."
takeaways: ["An E.164 number is a plus sign, the country code and the national number: up to 15 digits in total, with no spaces, dashes or brackets.", "Conversion means removing the national trunk prefix, usually 0, but not every country has one: ITU's dialling-procedures table lists none for Italy, Spain and Qatar.", "Meta recommends including the plus sign and country calling code in WhatsApp send requests, because a number without them has the sender's country code added and can reach the wrong person.", "A regex checks the shape of a number; a library such as libphonenumber checks that it is valid for its country.", "Excel can drop leading zeros and show long numbers in scientific notation, so keep phone columns formatted as Text."]
faq: 
  - q: "What is E.164 format?"
    a: "E.164 is the international telephone numbering plan defined by ITU-T Recommendation E.164. In everyday use, an E.164 number is a plus sign, the country code and the national number written as digits only, with at most 15 digits in total. It identifies a number uniquely worldwide, which is why messaging platforms and APIs ask for it."
  - q: "How do I convert a phone number to E.164?"
    a: "Remove spaces, dashes and brackets. Drop the national trunk prefix if the country uses one, usually a leading 0. Add the plus sign and the country code. So the UAE number 050 123 4567 becomes +971501234567. Countries such as Italy keep the leading 0 of landline numbers, so check the country rule or use a library."
  - q: "How many digits can an E.164 number have?"
    a: "At most 15 digits, counting the country code and the national number, and not counting the international call prefix. The plus sign is not a digit. Many national numbers are much shorter. A value longer than 15 digits cannot be a valid E.164 number and usually means a pasted error or a damaged spreadsheet cell."
  - q: "Does the WhatsApp API need the plus sign?"
    a: "Meta's documentation says plus signs, hyphens, parentheses and spaces are supported in send message requests, and strongly recommends including the plus sign and country calling code. Without the plus sign, the sender's country calling code is added to the number, which can send the message to a different, wrong number. Send full E.164 to stay safe."
  - q: "Why does Excel remove the zero or change my phone numbers?"
    a: "Excel treats a phone number typed as a number as a numeric value. Microsoft documents that this removes leading zeros and shows long numbers in scientific notation, because Excel keeps 15 digits of precision. Format the column as Text before entering or pasting numbers, or start entries with an apostrophe, and re-enter numbers typed earlier."
  - q: "Is a valid E.164 number also a reachable number?"
    a: "No. A number can be correctly formatted but unassigned, disconnected or ported. Format validation checks the shape and length for a country. To find out whether a number is active and on which network, use an HLR or number lookup before a large send."
sources: 
  - title: "Recommendation ITU-T E.164: The international public telecommunication numbering plan"
    url: "https://www.itu.int/rec/T-REC-E.164"
  - title: "Dialling procedures (international prefix, national (trunk) prefix and national (significant) number), ITU Operational Bulletin No. 994, 15.XII.2011"
    url: "https://www.itu.int/dms_pub/itu-t/opb/sp/t-sp-e.164c-2011-pdf-e.pdf"
  - title: "WhatsApp user phone number formats — WhatsApp Business Platform, Meta for Developers"
    url: "https://developers.facebook.com/documentation/business-messaging/whatsapp/business-phone-numbers/phone-numbers"
  - title: "Keeping leading zeros and large numbers — Microsoft Support"
    url: "https://support.microsoft.com/en-au/excel/keeping-leading-zeros-and-large-numbers"
  - title: "libphonenumber — Google, open-source library on GitHub"
    url: "https://github.com/google/libphonenumber"
---

# E.164 Phone Number Format: How to Convert and Validate

Canonical: https://omnichannels.ai/blog/e164-phone-number-format/
Language: en
Publisher: OmniChannels.ai by BroadNet Technologies

This guide is for marketers, analysts and developers who handle phone numbers for SMS or WhatsApp and need them in the form an API accepts. It explains what E.164 is, shows how to convert numbers from different countries, and covers validation in code and the spreadsheet problems that corrupt numbers before they are ever sent.

## What is E.164 format?

E.164 is the international public telecommunication numbering plan, published by the ITU-T as Recommendation E.164. Day to day, the term describes a way of writing a number: a plus sign, the country code and the national number, as digits only.

An E.164 number has these parts:

- **`+`** stands for the international call prefix, which differs by country (00 in many places, 011 in the US).
- **Country code**, one to three digits, such as 971 for the UAE or 1 for the US and Canada.
- **National number**, the rest of the number without the national trunk prefix.

The recommendation sets the maximum length at 15 digits, excluding the international prefix. So `+971501234567` is valid E.164 (12 digits), while a 17-digit value cannot be. Our [glossary entry on E.164](/glossary/e164/) gives a short definition.

## How do I convert a local phone number to E.164?

Remove the formatting, drop the national trunk prefix if there is one, and add the plus sign and country code.

1. **Remove spaces, dashes, dots and brackets.** `050 123 4567` becomes `0501234567`.
2. **Remove the international call prefix** if the number has one: `00971...` or `011...` becomes `971...`.
3. **Drop the national trunk prefix** if the country uses one. In many countries it is `0`; in the US and Canada it is `1`.
4. **Add the country code** if it is not already there.
5. **Add the plus sign.**

You need to know the country to do this. `0501234567` is only meaningful with a country attached, which is why spreadsheets should carry a country column.

## What do E.164 numbers look like in different countries?

The table shows examples. The numbers are illustrative placeholders, not real subscribers. Dialling codes come from our regulation data; trunk prefixes come from ITU's dialling-procedures table.

| Country | Dialling code | Trunk prefix (ITU table) | Local form (example) | E.164 |
|---|---|---|---|---|
| UAE | +971 | 0 | 050 123 4567 | +971501234567 |
| Saudi Arabia | +966 | 0 | 051 234 5678 | +966512345678 |
| Qatar | +974 | none listed | 5512 3456 | +97455123456 |
| Kenya | +254 | 0 | 0712 345 678 | +254712345678 |
| United Kingdom | +44 | 0 | 07700 900123 | +447700900123 |
| Germany | +49 | 0 | 0151 12345678 | +4915112345678 |
| India | +91 | 0 | 098765 43210 | +919876543210 |
| Spain | +34 | none listed | 612 345 678 | +34612345678 |
| Italy (mobile) | +39 | none listed | 312 345 6789 | +393123456789 |
| Italy (landline) | +39 | none listed | 06 1234 5678 | +390612345678 |
| United States | +1 | 1 | (202) 555-0123 | +12025550123 |

The ITU table is a published position from December 2011, so treat it as a guide to the pattern and confirm a specific country with the library or the regulator.

## Why does Italy keep the leading 0?

Because in Italy the 0 is part of the number, not a trunk prefix. ITU's dialling-procedures table shows Italy (country code 39) with no national prefix, so there is nothing to drop. Italian geographic numbers begin with 0, as in the Rome-style example `06 1234 5678`, and keep it in international form: `+390612345678`. Italian mobile numbers begin with 3 and have no zero to keep, so `312 345 6789` becomes `+393123456789`.

Do not apply "always drop the zero" as a blanket rule. The same table lists no trunk prefix for Spain and Qatar either, and the data changes, which is a good reason to use a library for anything you cannot check by hand.

## Why do SMS and WhatsApp APIs need E.164?

Because routing depends on an unambiguous number. A number without a country code can belong to many countries, so the platform could send to the wrong market, apply the wrong sender ID rules and bill the wrong rate. Rates, sender ID registration and promotional sending hours are all applied per destination country, and the country code is how the destination is identified.

### What does Meta say about WhatsApp numbers?

Meta's documentation on WhatsApp user phone number formats says that plus signs, hyphens, parentheses and spaces are supported in send message requests, and it strongly recommends including the plus sign and the country calling code. If the plus sign is missing, the sender's country calling code is added to the number, which can lead to a message going to a wrong number. Meta's example: for a sender in India (code 91), `(631) 555-1234` is delivered to `+916315551234`, while `+1 (631) 555-1234` is delivered correctly. Meta also notes that for Brazil and Mexico the Cloud API may modify the extra prefix that appears in some numbers, and calls this standard behaviour.

The safe approach: store clean E.164 and send exactly that.

### What about SMS?

SMS APIs also expect the full international number. Some require the digits without the plus sign; the format differs between APIs and protocols, so check the documentation of the API you use and test with your own number. See [send SMS via API](/blog/send-sms-api-examples/) and [send a WhatsApp message via API](/blog/send-whatsapp-message-api-examples/) for working examples.

## How do I validate and normalise numbers in code?

Use a regex for a quick shape check and a library for real validation.

A common E.164 shape check:

```js
// Plus, a non-zero first digit, then 1 to 14 more digits: 15 digits at most
const E164 = /^\+[1-9]\d{1,14}$/;

function looksLikeE164(value) {
  return E164.test(value);
}

looksLikeE164("+971501234567"); // true
looksLikeE164("0501234567");    // false: no plus or country code
looksLikeE164("+0501234567");   // false: country codes do not start with 0
```

The regex checks length and characters only. It accepts `+99999999999` even though no such number exists. For real validation, use Google's open-source libphonenumber, a library for parsing, formatting and validating international phone numbers, available for Java, C++ and JavaScript, with community ports in other languages. Its README describes `isValidNumber` as full validation for a region using length and prefix information, and shows formatting a parsed number as E.164.

```python
# pip install phonenumbers  (a Python port of libphonenumber)
import phonenumbers

def to_e164(raw, default_region):
    try:
        number = phonenumbers.parse(raw, default_region)  # e.g. "AE", "SA", "GB"
    except phonenumbers.NumberParseException:
        return None
    if not phonenumbers.is_valid_number(number):
        return None
    return phonenumbers.format_number(number, phonenumbers.PhoneNumberFormat.E164)

print(to_e164("050 123 4567", "AE"))   # +971501234567 if the number is valid for the UAE
print(to_e164("+44 7700 900123", "GB"))
```

Ports are written by outside developers, so check the quality of the one you choose. Parse with a default region taken from your customer's country, then store the E.164 result. Keep the raw input too, so you can re-parse if rules change.

Normalise at the point of entry, in the sign-up form, the CRM import or the API, not at send time. A number written two ways becomes two contacts who each receive the same campaign.

## How do I fix phone numbers in a spreadsheet?

Format the phone column as Text before you enter or paste numbers. The common problems are:

| Problem | What happens | Fix |
|---|---|---|
| Leading zero removed | `0501234567` becomes `501234567` | Format cells as Text first; or start an entry with an apostrophe |
| Scientific notation | A long number shows as `9.71501E+11` | Format as Text; Excel keeps 15 digits of numeric precision |
| Plus sign lost | A numeric cell may not keep the `+` | Format as Text, then check the first characters of the column |
| Spaces and dashes | `971 50 123 4567` | Remove them with Find and Replace or `SUBSTITUTE` |
| Country code missing | Local numbers only | Add a country column; build the number with a formula |

Microsoft documents that Excel removes leading zeros and converts large numbers to scientific notation, and that numbers entered before the Text format was applied must be entered again. When you open a CSV file directly, Excel applies its default formats to each column, so use the Text Import Wizard or From Text/CSV to mark the phone column as text.

For a UAE mobile list stored as `050 123 4567` in column A, this formula builds E.164 as text:

```text
="+971"&RIGHT(SUBSTITUTE(A2," ",""),9)
```

It keeps the last nine digits after removing spaces, so it fits only numbers of that shape. Copy the result and paste as values before saving to CSV. The [phone number formatter](/tools/phone-number-formatter/) converts a number without a formula, and our guide to [sending bulk SMS from Excel or CSV](/blog/send-bulk-sms-from-excel-csv/) shows the full upload workflow.

## Worked example: cleaning a customer list

"Souq Rafiq" (synthetic), a Dubai retailer, exports 8,000 contacts from three systems with numbers like `0501234567`, `971 50 123 4567`, `+971-50-123-4567` and `00971501234567`.

1. The analyst adds a country column from each customer's billing country.
2. A script parses every row with the country as the default region, so all four formats become `+971501234567`.
3. Rows that fail validation go to a review sheet instead of being sent.
4. Duplicates are removed after normalisation, which collapses the four formats into one contact.
5. An HLR lookup flags inactive numbers before the campaign. See [HLR lookup explained](/blog/hlr-lookup-number-validation/).
6. The clean column is stored as Text and uploaded.

Normalising first is what makes the duplicate check work; before it, the same customer looked like four people.

## What are the common mistakes?

- **Always dropping the leading zero.** Some countries, such as Italy, have no trunk prefix.
- **Keeping the zero and adding the country code,** giving `+9710501234567`.
- **Sending without the plus sign** to WhatsApp, so the sender's country code is added.
- **Using a regex as validation.** It checks shape, not validity.
- **Letting Excel treat phones as numbers,** losing zeros or switching to scientific notation.
- **Normalising at send time** instead of at entry.
- **Assuming a valid format means a reachable number.** Ported or disconnected numbers still fail.
- **Trusting a static table.** Numbering plans change; use a maintained library.

## How OmniChannels.ai helps

OmniChannels.ai accepts international numbers for SMS and WhatsApp through one REST API, and its [campaigns](/platform/campaigns/) accept Excel and CSV uploads with preview and duplicate filtering. BroadNet offers HLR and number lookup, so you can check that a well-formed number is live. Read the [SMS API docs](/developers/sms/) and [WhatsApp API docs](/developers/whatsapp/) for the exact request fields, or [talk to our team](/contact/) about onboarding.
