Phone numbers are the most commonly mangled data field in existence, and the mangle always starts the same way: someone stored what the user typed. Here's the one format that doesn't lose information, the country rules that break naive parsing, and the checks that matter — all with numbers you can verify.
E.164 is the ITU standard that defines how a globally unique phone number is written: a plus sign, the country calling code, then the national significant number (NSN) — the part that actually identifies the subscriber. No spaces, no dashes, no parentheses, no leading zeros. Maximum 15 digits including the country code.
+14155552671 — country code 1, NSN 4155552671 (area code + line)+442070313000 — country code 44, NSN 2070313000+5511912345678 — country code 55, NSN 11912345678 (11 digits, mobile)Every other way of writing a number either loses the country (national format), loses uniqueness (a bare 10-digit string could be US, CA, or a dozen other +1 countries, or a Caribbean island), or carries decoration that varies by who typed it. Store E.164; render beautifully elsewhere.
Most of the world dials a leading 0 to escape the local network. The UK, Germany, France, Spain, the Netherlands, Australia, Japan, Nigeria — all trunk-prefix countries. The rule people get wrong: the trunk prefix is part of the domestic dialing ritual, not part of the number.
| Country | You dial domestically | E.164 | NSN |
|---|---|---|---|
| United Kingdom | 020 7031 3000 | +442070313000 | 10 digits |
| Germany | 030 901820 | +4930901820 | 8 digits |
| France | 01 42 68 53 00 | +33142685300 | 9 digits |
| Australia | (02) 9250 7111 | +61292507111 | 9 digits |
| Japan | 03-3212-1111 | +81332121111 | 9 digits |
| United States | (415) 555-2671 | +14155552671 | 10 digits |
See the pattern? Strip the 0, prepend the country code. The US row looks the same only because North America never had a trunk prefix — its "1" is the country code it happens to share with Canada and 20-odd Caribbean nations, which is also why a bare "10-digit US number" is ambiguous the moment a Canadian signs up.
The classic import bug: a spreadsheet of UK numbers in national format, someone strips punctuation and prepends +44 without removing the 0, and every SMS to +4402070313000 silently fails. The 0 goes. Always.
Two checks, two meanings, and conflating them is how validation bugs ship:
+1 300-555-0100: ten digits, possible. A cheap sanity check while someone is typing.What neither check tells you: whether anyone actually holds the number. Metadata knows the map, not the residents. Confirming possession takes an SMS code or a call — which is why every serious signup flow validates format offline first, then verifies ownership out-of-band.
Numbering plans that encode line type in the prefix let metadata distinguish them: UK 07-prefixed numbers are mobile, 02-prefixed are fixed. Brazil's mobiles carry the 9. But the US and Canada lump everything as "fixed or mobile" because NANP allocation doesn't separate them. And portability — moving a number between carriers, or fixed-to-mobile — means the type baked into the prefix can drift from reality. Type is a strong hint, not a guarantee; if your flow depends on "this is definitely a mobile," an SMS handshake is the only proof.
tel:+14155552671 (RFC 3966) for links and QR codes.Step 2 is where our phone number validator lives: paste any number, get the verdict plus all four formats, with the entire Google dataset running in your browser — no API, so customer lists stay home.
Paste any number, get validity, E.164, and line type — offline metadata, zero uploads.
Phone Number Validator →Phone number handling goes wrong at the storage boundary, not the input boundary. Accept generously, parse with real metadata, store E.164, format for humans on the way out — and respect the trunk prefix, because that 0 is the single most expensive character in telecom data. The validator covers the parse-and-check step; for the QR side of step 4, the QR code generator takes tel: URIs directly.
A plus sign, the country calling code, and the national significant number — no spaces, dashes, parentheses, or leading zeros. A San Francisco number is +14155552671 in E.164; the same number written (415) 555-2671 is US national format and 4155552671 without the country code is not globally unique. Fifteen digits is the ITU maximum, including the country code.
The 0 is a trunk prefix — the digit you dial to get out of the local network, used by the UK, Germany, France, Japan, Australia, and dozens of others. You dial 020 7031 3000 inside the UK but write +44 20 7031 3000 internationally, because E.164 drops the trunk prefix. The US and Canada never had one, which is why (415) 555-2671 loses nothing but punctuation going to +14155552671.
Yes — it's the only format that is simultaneously unique, sortable, and dialable. Store E.164, validate at the door with libphonenumber-style metadata, and render national or international format at display time. Storing formatted numbers means every dedupe, search, and SMS send fights inconsistent punctuation, and two rows can hold the same number.
Possible means the length fits one of the country's allowed ranges — the number could exist. Valid means the leading digits also match an allocated block. +1 300-555-0100 is possible but not valid: ten digits like a US number, but area code 300 is unassigned. Neither check confirms the number is in service; only a call or SMS does that.
Fifteen total in E.164, country code included, per the ITU standard. Real national significant numbers run from about 8 digits (Germany's fixed lines) to 11 (Brazil's mobiles); the US and Canada use 10. Numbers longer than 15 digits after the plus are either mistyped or carry an extension, which belongs in a separate field.