Online Playground
Browse tools

E.164 Converter

Convert phone numbers in any style to clean E.164 format for APIs, databases and SMS.

Convert numbers to E.164

Try

Processed locally with libphonenumber-js. Nothing you enter is sent to a server.

How it works

Three steps, all in your browser

  1. 1

    Choose the country the numbers are from

    Local numbers like (415) 555-2671 only make sense in one country, so pick it as the default.

  2. 2

    Paste your list

    The converter removes spaces, dashes, brackets and trunk prefixes and adds the country code.

  3. 3

    Copy or download

    Copy the E.164 column, or download a CSV that keeps your original input next to the result.

In depth

How local numbers become E.164

E.164 is the international standard that writes every phone number as a plus sign, the country calling code and the digits, with no spaces or punctuation. The converter adds the calling code of the default country and removes the trunk prefix, the leading digit people dial for calls inside their own country. Here is real converter output for ten countries.

CountryYou typedE.164 resultTrunk prefix removed
United States(213) 373-4253+121337342531
United Kingdom020 7946 0958+4420794609580
Germany030 123456+49301234560
France01 23 45 67 89+331234567890
India098765 43210+9198765432100
Australia(02) 1234 5678+612123456780
Japan03-1234-5678+813123456780
Brazil(11) 91234-5678+55119123456780
Spain612 34 56 78+34612345678none
Italy06 1234 5678+390612345678none

Why the leading 0 disappears

In the UK, Germany, France, India and many other countries, national numbers start with 0 when dialled inside the country. That 0 is a trunk prefix. It is not part of the number, so it is dropped when the country code is added: 020 7946 0958 becomes +442079460958, not +4402079460958. The US and Canada use 1 as the trunk prefix in the same way. Italy is the famous exception: its landline numbers keep the leading 0 even in international form, which is why the Italy row above ends up as +390612345678.

Why a number fails to convert

The converter never guesses. When a number cannot be converted it tells you why, using the library's own error codes. These are real results.

Default countryInputResult
United States12345TOO_SHORT
United States(213) 373-425TOO_SHORT
United States(213) 373-42531TOO_LONG
No default country(213) 373-4253INVALID_COUNTRY
No default country+9991112223333INVALID_COUNTRY
United Statescall meNOT_A_NUMBER
United Stateshello 213 373 4253NOT_A_NUMBER

Using E.164 in your own system

E.164 is the format SMS and voice APIs such as Twilio ask for, and it is the safest format for a database column: it is unique per number, sorts cleanly and needs no country context. Keep the original input in a separate column if you want to show it back to the user.

FAQ

Questions people ask

What is E.164?

E.164 is the international standard for phone numbers from the ITU. A number is a plus sign, a country code and the national number, in at most 15 digits, with no spaces or punctuation. Example: +14155552671.

Does converting to E.164 check the number is real?

It checks the number against the numbering plan of its country, the same way the validator does. A converted number can still be disconnected. Untick "valid numbers only" to keep numbers that are possible but unassigned.

How do I convert a number with a leading 0?

Choose the country as the default. Leading 0s in national numbers are trunk prefixes, and they are removed when the country code is added: 020 7946 0958 in the UK becomes +442079460958.