Technical

Phone number formats and E.164, explained

The same phone number is written a dozen ways, and a database that stores them as typed cannot match, dedupe or dial them reliably. The fix is to store one canonical international form and format it for display at the edge. This guide covers what that form is, what the parts of a number mean, how extensions fit, and what the LookValid phone check accepts and returns.

By LookValid engineering. Published 2026-10-19.

What E.164 is and why you store it

E.164 is the ITU-T recommendation titled "The international public telecommunication numbering plan" 1. In practice it defines the shape of a number you can dial from anywhere: a country calling code followed by the national significant number, written with a leading plus sign. The plus sign is notation for "an international dialling prefix goes here", and the prefix itself differs by country, so it is not stored.

An E.164 number is limited to 15 digits in total, the country code included 2. That makes it short enough for a fixed column and unambiguous enough to use as a key, which is why it is the right form to store. Everything else is presentation.

  • Store +12025550143: a plus, then digits only, no spaces, dashes or brackets.
  • Keep the number and its extension in separate columns, because an extension is not part of E.164.
  • Format for display from the stored value, in the reader's own convention.

Country codes, national numbers and prefixes

The country calling code is one to three digits for a geographic area 2. The rest is the national significant number, and its internal layout is a national matter: each country decides how many digits it has and how they are grouped 2. Several countries can share a code. Code 1 belongs to the North American Numbering Plan, which includes the United States and its territories, Canada and some Caribbean countries 3.

The leading digit people dial before a local number inside their own country is a national prefix, not part of the number. In the United Kingdom a London number is written 020 7946 0018 at home and +44 20 7946 0018 abroad: the 0 is dropped once the country code is present. That is why you display the national form to local users and store the international one, and why a parser needs to know the country of a number written without a plus sign.

Format rules at a glance
PartRuleStored in E.164?
Leading plusMarks an international numberYes
Country calling code1 to 3 digits for a geographic areaYes
National significant numberLayout set by each countryYes
National prefix, such as a leading 0Dialled only inside the countryNo
Spaces, dashes, brackets, dotsPresentation onlyNo
ExtensionReached after the call connectsNo, store separately

Format rules at a glance

What our phone check does with real input

The LookValid phone check reads a number with an optional two-letter country hint, and assumes US when you send none. It checks the number against the numbering plan and returns the E.164, national and international formats, the calling code, the country, the number type the plan assigns and, for North American numbers, the area code and its region. It never contacts a carrier, so it cannot tell you whether a line is switched on or has been ported.

We ran the live provider on reserved example numbers. These are the actual outputs.

Phone check output for example inputs
InputCountry hintE.164National formatTypeExtension
+1 202 555 0143none+12025550143(202) 555-0143fixed_line_or_mobilenull
(202) 555-0143US+12025550143(202) 555-0143fixed_line_or_mobilenull
020 7946 0018GB+442079460018020 7946 0018fixed_linenull
+44 20 7946 0018none+442079460018020 7946 0018fixed_linenull
+1 202 555 0143 ext. 22none+12025550143(202) 555-0143fixed_line_or_mobile22
202-555-0143 x7US+12025550143(202) 555-0143fixed_line_or_mobile7

Phone check output for example inputs

Four inputs spelled in different ways collapse to two E.164 values, and the UK number with the leading 0 and the one with +44 give the same result. A number with letters in its body, such as +12025550143abc, is refused as invalid input, and 12345 with a US hint comes back as not found because its length does not match the plan for +1. A number the plan rejects costs nothing.

A found number is billed at 1 credit per the catalog.

Extensions

The check splits a trailing extension of one to eight digits off the end of the input before it reads the number, so ext. 22, x7 and #12 all work. The extension comes back in its own extension field and is never folded into e164. Two inputs that differ only by extension are different lookups, so store the two values side by side and join them only when you dial.

curl -X POST https://YOUR_API_HOST/v1/phone \
  -H "Authorization: Bearer $LOOKVALID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone":"020 7946 0018","country":"GB"}'

One phone lookup with a country hint

A storage checklist

  1. Validate at the point of entry and ask for the country when the user does not type a plus sign.
  2. Store the e164 value from the result, not the typed string.
  3. Store the extension and the two-letter country in their own columns.
  4. Render national format for local users and international format for everyone else.
  5. Treat the number type as a hint from the plan. It is not a carrier lookup.

Try the phone number validator in the browser, check a calling code with the country code lookup, read the docs, or follow the Python tutorial to clean a whole list.

Sources

  1. ITU-T Recommendation E.164: The international public telecommunication numbering plan, read 2026-10-19
  2. ITU: E.164 numbering structures (country code, national significant number, 15 digit maximum), read 2026-10-19
  3. NANPA: North American Numbering Plan Administrator, read 2026-10-19