Phone Number Format: E.164 and International Formats Explained
How to format phone numbers: E.164, international and national formats, examples for 16 countries, and how to store and validate numbers correctly.
TL;DR: Store every phone number in E.164 format: a plus sign, the country code, then the national number with no spaces or punctuation, up to 15 digits (for example +12015550123). Show numbers to people in their local national format, and use a library such as libphonenumber, not a regex, to convert between the two.
A phone number has three common written forms, and most data problems come from mixing them up:
- E.164 is the machine format:
+12015550123. One string per number, no matter where it’s from. - International format is E.164 with spaces for people to read:
+1 201 555 0123. - National format is how people dial and write numbers inside their own country:
(201) 555-0123in the US,07400 123456in the UK.
This guide covers what each one is, how numbers are built in the countries you’re most likely to see, and how to store and validate them so your CRM, SMS tool and dialer agree.
What is E.164?
E.164 is the international numbering standard published by the ITU, the UN agency for telecoms. It defines how every phone number in the world fits into one plan, and it gives us the one format every phone system accepts.
An E.164 number is:
- A plus sign (
+) - The country calling code, 1 to 3 digits (
1for the US and Canada,44for the UK,234for Nigeria) - The national significant number: the area or mobile code plus the subscriber number, without the leading trunk
0that many countries use for local dialling
The whole thing is at most 15 digits, country code included, with no spaces, dashes, brackets or extensions.
| Written locally | E.164 |
|---|---|
| (201) 555-0123 (US) | +12015550123 |
| 07400 123456 (UK) | +447400123456 |
| 0412 345 678 (Australia) | +61412345678 |
| 01512 3456789 (Germany) | +4915123456789 |
The step people forget is dropping the trunk prefix. A UK number written 07400 123456 becomes +44 7400 123456, not +44 07400 123456. Keep the zero and the number won’t connect.
The big exception is Italy: Italian landlines keep their leading 0 in every format, so Rome’s 06 6982 1234 is +39 06 6982 1234. (Italian mobiles start with 3 and have no zero.) That’s why a rule like “strip every leading zero” breaks real numbers. Let a phone library decide.
E.164 vs international format
They contain the same digits. International format just adds spaces in the places a local reader expects them: +44 7400 123456. Use it on screen and in email signatures. Use E.164 in your database, APIs and SMS tools.
Phone number formats by country
The examples below come from the example-number metadata in Google’s libphonenumber, the library behind Android’s phone number handling. They’re sample mobile numbers, not real subscribers.
| Country | Code | International format | National format | Digits after the code |
|---|---|---|---|---|
| United States | +1 | +1 201 555 0123 | (201) 555‑0123 | 10 |
| Canada | +1 | +1 506 234 5678 | (506) 234‑5678 | 10 |
| United Kingdom | +44 | +44 7400 123456 | 07400 123456 | 10 |
| Australia | +61 | +61 412 345 678 | 0412 345 678 | 9 |
| India | +91 | +91 81234 56789 | 81234 56789 | 10 |
| Mexico | +52 | +52 222 123 4567 | 222 123 4567 | 10 |
| Germany | +49 | +49 1512 3456789 | 01512 3456789 | varies (here 11) |
| France | +33 | +33 6 12 34 56 78 | 06 12 34 56 78 | 9 |
| Brazil | +55 | +55 11 96123 4567 | (11) 96123‑4567 | 10–11 |
| Spain | +34 | +34 612 34 56 78 | 612 34 56 78 | 9 |
| Italy | +39 | +39 312 345 6789 | 312 345 6789 | varies (here 10) |
| Netherlands | +31 | +31 6 12345678 | 06 12345678 | 9 |
| Japan | +81 | +81 90 1234 5678 | 090‑1234‑5678 | 10 |
| Philippines | +63 | +63 905 123 4567 | 0905 123 4567 | 10 |
| South Africa | +27 | +27 71 123 4567 | 071 123 4567 | 9 |
| Nigeria | +234 | +234 802 123 4567 | 0802 123 4567 | 10 |
A few things this table shows:
- Many countries use a trunk
0for national dialling (UK, Australia, Germany, France, Japan, South Africa). It disappears in international and E.164 format. - Some countries don’t: Spain and Mexico write their numbers the same way at home and abroad, minus the country code, and Italian landlines keep their
0even internationally. The US and Canada use a1instead, dialled before the area code for long-distance calls. - Indian mobile numbers are 10 digits starting with 6, 7, 8 or 9. You may see a leading
0in some formats, but it isn’t part of the number. - Length isn’t fixed everywhere. Germany and Italy have variable-length numbers, so “must be 10 digits” rules will reject real numbers.
US and Canada (NANP)
The US, Canada and about 20 Caribbean countries share country code +1 under the North American Numbering Plan. Every number is 10 digits: a 3-digit area code, a 3-digit exchange and a 4-digit line number, written (NPA) NXX-XXXX. Neither the area code nor the exchange can start with 0 or 1.
Common ways to write the same US number:
(201) 555-0123, the usual national format201-555-0123or201.555.0123+1 201 555 0123, international+12015550123, E.164
Because Canada and the US share +1, you can’t tell the country from the country code alone. It takes the area code.
Mexico
Mexico moved to a single 10-digit national format in August 2019 and dropped the old 044, 045 and 01 prefixes. Before then, mobiles called from abroad needed an extra 1 after the country code (+52 1 ...). Older lists may still carry it. Remove it when you normalize.
Dialling prefixes are not part of the number
Two prefixes appear when people dial, but they don’t belong in a stored number:
- The international (exit) prefix you dial to call abroad:
011from the US and Canada,00from most of Europe. The+in E.164 stands in for whatever exit code the caller’s country uses. - The trunk prefix for calls within a country: usually
0. It’s dropped once a country code is in front.
So 011 44 7400 123456 dialled from New York, 00 44 7400 123456 dialled from Paris and 07400 123456 dialled from London are all +447400123456.
How to store phone numbers
If you only take one thing from this guide: store E.164, display national or international.
- One column, E.164 string.
+447400123456. Don’t store numbers as integers: you’ll lose the+, and some systems drop leading zeros. - Keep extensions separately. E.164 has no extension field. Store
ext. 204in its own column, or use thetel:URI formtel:+12015550123;ext=204from RFC 3966. - Format on output. Show
(201) 555-0123to a US user and+1 201 555 0123to everyone else. - Normalize at the edge. Convert to E.164 when the number enters your system (form, import or API) so every downstream tool sees the same string.
How to validate a phone number
There are three levels of “valid”, and they answer different questions.
1. Is it formatted correctly?
Does the number have the right length and prefix for its country? This is a pure format check, and it’s free and instant. Use a maintained library, not a home-made regex. Numbering plans change every year, and a regex that accepts +1 (000) 000-0000 or rejects real German numbers will quietly corrupt your data.
- JavaScript:
libphonenumber-js - Python:
phonenumbers - Java/Android: Google’s
libphonenumber - Ruby:
phonelib
import { parsePhoneNumber } from 'libphonenumber-js'
const phone = parsePhoneNumber('07400 123456', 'GB')
phone.isValid() // true
phone.number // '+447400123456' (E.164)
phone.formatInternational() // '+44 7400 123456' One detail that trips developers up: most of these libraries have both isPossible() and isValid(). isPossible() only checks the length. isValid() checks the number against the country’s real ranges, and it’s the one you want.
You can try this without writing code in the free Truelist phone validator: paste a number and it shows the country, the E.164 and national formats, and the line type implied by its range.
2. What kind of line is it?
A number range can hint at the line type in some countries (UK 07 numbers are mobile, for example), but not in the US and Canada, where mobile, landline and VoIP numbers share the same ranges and numbers can be ported between carriers. To know the line type and carrier a number has today, you need a carrier lookup against live network data.
3. Does it work?
Whether a number is assigned and reachable takes a live network query, not a format check. That’s the job of a phone validation service.
For signups, imports and outbound lists, Truelist phone validation is built to run all of this in one call: format and E.164 normalization, plus line type and carrier.
Phone number fields in forms
Good formatting starts with the input:
- Use
<input type="tel" autocomplete="tel">so phones show a number pad and browsers can autofill. - Let people type the number the way they’re used to. Strip spaces and punctuation yourself, don’t make them do it.
- Ask for the country (or default it from the visitor’s location) so a national number like
07400 123456can be converted to E.164. - Validate on blur and show a specific message (“That number is too short for the UK”), not a generic “invalid”.
- For click-to-call links, use E.164 in the
href:<a href="tel:+12015550123">(201) 555-0123</a>.
Common questions about phone number formats
What is the correct phone number format?
For storage and systems, E.164: + country code and number, no spaces, up to 15 digits, for example +12015550123. For people, the country’s national format, such as (201) 555-0123 in the US.
What does E.164 stand for?
E.164 is the name of the ITU-T recommendation that defines the international public telephone numbering plan. The “E” series covers telephone network operation, and 164 is the document number.
How many digits is a phone number?
It depends on the country. US and Canadian numbers have 10 digits plus the country code 1. UK numbers have 10 digits after +44. E.164 caps the total at 15 digits, country code included.
Do I include the 0 when adding a country code?
No. The leading 0 is a domestic trunk prefix. Drop it when you add the country code: 020 7946 0123 in London becomes +44 20 7946 0123. Italy is the exception: its landlines keep the 0.
How do I write a US phone number internationally?
+1 followed by the 10-digit number: +1 201 555 0123 for display, or +12015550123 in E.164.
Can toll-free numbers be dialled from abroad?
Often not. Toll-free numbers such as US 1-800 or UK 0800 numbers are free for the caller because the business pays, and many only work from inside their own country. Writing them in E.164 doesn’t make them reachable internationally.
Can I validate phone numbers with a regex?
Only loosely. A regex can check for digits and a plus sign, but it can’t know each country’s valid ranges and lengths, and those change. Use libphonenumber or a port of it for format checks, and a lookup service if you need to know the line type or whether the number is live.
The short version
Collect numbers however people like to type them, convert them to E.164 the moment they enter your system, store that one string, and format it back to national style when you show it. Use a real phone number library for format checks, and a carrier lookup when you need to know what’s actually on the other end of the line.
