HOW-TO

How to format a phone number to E.164

Convert a local or messy phone number into clean E.164 for APIs. Step-by-step, plus a free validator that outputs E.164.

Most SMS and verification APIs — including ours — require phone numbers in E.164: a plus sign, the country code, and the national number, with no spaces or punctuation. Here is how to normalize any number into that form.

The normalization rules

Start from the country. Drop the international dialing prefix (00 or 011) if present, and remove the national trunk prefix (often a leading 0). Prepend + and the country calling code, then the remaining national digits. Strip all spaces, dashes, and parentheses. The result is E.164.

Let a validator do it

Edge cases — variable-length numbers, ambiguous prefixes — make manual formatting error-prone. Our phone validator normalizes any input (with a country hint for local formats) and outputs the canonical E.164 string you can copy straight into an API.

Step by step

1

Identify the country (or provide it as a hint for a local-format number).

2

Remove the international prefix (00/011) and the national trunk zero.

3

Prepend + and the country calling code, then the national number.

4

Strip spaces, dashes and parentheses — or just paste it into the validator and copy the E.164 output.

Try it now — free, no signup

Use the phone validator in your browser. Then, when you need it at scale with an API key and higher limits, grab the full Eveses API.

FAQ

Do I keep the leading zero?›
No — drop the national trunk zero when adding the country code. +44 20… not +44 020….
What if I do not know the country?›
A number without + is ambiguous. Provide a country hint; our validator uses it to normalize correctly.

Related