S2.07.2Country-specific phone number length and groupingdesignresearch

Phone-number length and grouping vary by country

Aliases: phone number length · number grouping · variable-length numbering plan · digit grouping

What it is

Country-specific phone-number length and grouping means that digit counts, permitted lengths, and the positions of spaces, hyphens, or parentheses depend on a particular numbering plan and number type. There is no dependable global template consisting of one total length and groups of three. Fixed-line, mobile, toll-free, special-service, and regional ranges can differ even within the same country.

Why it happens

An international E.164 number allocates digits between a country calling code and the following number components. ITU-T E.164 sets a maximum of 15 digits for a standard international number, but that ceiling does not define the one valid input length for every country. National numbering plans then allocate ranges to areas, networks, and services; both fixed- and variable-length plans exist. Visual grouping is a human-readable rendering rule, commonly selected by prefix and type, rather than the machine identity of the number. Libphonenumber therefore maintains possible lengths and formatting patterns by region, type, and leading digits instead of applying one global regular expression; it also accommodates documented real-world data outside the nominal standard limit.

Studying it

Extract current categories, lengths, transitions, and examples from each target market's numbering authority, then cross-check them against a pinned libphonenumber metadata version. A test corpus should cover every permitted-length boundary, variable-length regions, shared calling codes, non-geographic services, and transition-era ranges. Study short codes as a separate numbering resource. For presentation, compare ungrouped digits, authority-aligned grouping, and arbitrary equal-sized grouping on transcription errors, visual lookup, spoken confirmation, and editing. Preserve number type and prefix in analysis because country-level aggregation hides meaningful within-country variation.

Where it stops holding

“At most 15 digits” neither makes every shorter string valid nor supplies a universal storage limit for extensions, short codes, private-network numbers, or real-world out-of-standard data. Those objects may not be complete international E.164 numbers. An example demonstrates one shape for one region, type, and metadata date; it is not a global law. Plans expand, merge, and reassign ranges, and old and new lengths may coexist during migration. Separators are usually presentational, but extensions, pause characters, and vanity letters can carry extra meaning and cannot always be discarded without loss.

Applying it

  • Do not turn one market's digit count into a semantic maxlength or impose a three-digit input mask. A separate, generous, observable cap may protect resources and deter abuse; once region context is known, use updateable metadata to give length feedback for that number type.
  • Accept familiar spaces, hyphens, and parentheses, and use prefix-sensitive as-you-type formatting. Preserve stable caret, selection, and backspace behavior when grouping changes.
  • Apply E.164's 15-digit ceiling to canonical international-number output, not as a universal cap for short codes, extensions, private numbers, or raw records awaiting interpretation.
  • Keep official boundary examples for every target market and run them against a pinned metadata version. On upgrade, review changes in length, grouping, and type, then validate natural presentation with local users.

Related

  • Same group: S2.07.1 Relating country calling codes to national formats · S2.07.3 Strict validation rejects legitimate numbers · S2.07.4 Separate telephone-number display from storage
  • Adjacent: S2.02 Numbers, Decimal Marks, and Grouping Separators · S2.09 Regional Differences in Input Validation
  • Search terms: variable-length numbering plan · phone number grouping · as-you-type formatting

Cards in the same group

Quick Actions

Share

Share this page

ios_share

https://hci.top/en/handbook/S2.07.2