Reviewed guide

International Phone Number Format for Forms, CRM and SMS

Build phone fields and data workflows that accept human input, normalize it safely, store E.164 values, keep extensions separate, and return useful validation errors.

Last reviewed
Last reviewed:

A safe phone-number formatting workflow

  1. 1. Accept

    Use a telephone input and allow ordinary spaces, parentheses and hyphens. Do not require users to understand E.164 before they can type.

  2. 2. Preserve

    Keep the original submitted value for support and audit purposes. Never overwrite it with an inferred country or silently corrected number.

  3. 3. Resolve context

    Ask for a country when national-format input is allowed. A local number without a country code is not globally self-identifying.

  4. 4. Normalize

    Convert Unicode digits and plus signs, remove display punctuation, separate any extension, and reject unsupported symbols.

  5. 5. Parse and validate

    Split the calling code from the national significant number, then apply the selected country’s reviewed length and trunk-prefix rules.

  6. 6. Store and explain

    Write a canonical +digits field only after parsing succeeds. Return structured warnings and retain a human-readable display value separately.

What should a web form collect?

The HTML telephone input is the appropriate control, but the HTML Standard intentionally does not impose one telephone-number grammar because valid formats vary widely. Use the control for device-friendly input, then apply your own country-aware validation and accessible error messages.

<label>
  Country
  <select name="country" autocomplete="country-code">...</select>
</label>
<label>
  Phone number
  <input type="tel" name="phone" autocomplete="tel" inputmode="tel">
</label>
<label>
  Extension (optional)
  <input type="text" name="phone_extension" inputmode="numeric">
</label>

Before-and-after conversion examples

X characters are safe placeholders, not dialable subscriber digits.

CaseInputRequired contextCanonical fieldTransformation
UK landline020 7946 XXXXCountry = GB+44207946XXXXRemove the domestic trunk 0 after +44.
Italian landline06 XXXXXXXXCountry = IT+3906XXXXXXXXRetain the significant geographic 0 after +39.
US exit-code input011 44 20 7946 XXXXOrigin = US, destination = GB+44207946XXXXRemove the origin-specific 011 before storage.
Brazil carrier dial string0 21 11 9XXXX XXXXCountry = BR+55119XXXXXXXXRemove domestic routing and carrier-selection digits.
Copied Unicode+44 20‑7946‑XXXXCountry code present+44207946XXXXNormalize full-width characters and display punctuation.
PBX extension+1 202 555 01XX ext. 204Global number plus extension+120255501XXStore extension 204 in a separate field or RFC 3966 tel URI parameter.

Format rules by channel

ContextPreferred representationValidation boundary
Web formFriendly input plus explicit country selectionValidate on submit and again on the server; type=tel does not enforce a global syntax.
CRMCanonical number, raw input, country and extension in separate fieldsKeep provenance and last-validated time so later numbering-plan changes can be handled.
SMS platformCanonical international destination accepted by that providerFormatting does not prove the line is mobile, reachable, opted in or able to receive SMS.
Messaging appProvider-specific international identifierCheck the app’s current API rules; do not assume every valid phone number has an account.
Database or API+ followed by country code and national significant numberUse digits-only storage after +; derive localized display formatting at the presentation layer.
Clickable linktel:+44207946XXXX or tel:+120255501XX;ext=204RFC 3966 distinguishes the telephone identifier from the dial string used by a particular origin network.

Common validation failures and useful messages

  • Too many digits

    The country code plus national number exceeds the 15-digit E.164 maximum. Ask the user to remove an extension or duplicated prefix.

  • Unsupported symbols

    Reject letters, multiple plus signs, # or * in the canonical field. Preserve the raw input so the user can correct it.

  • Exit code included

    Explain that 00, 010, 011 or 0011 belongs to the origin dial string, not to the saved destination.

  • Country code duplicated

    Detect values such as +44 44… after country selection and ask which version is intended instead of silently deleting digits.

  • Country is ambiguous

    Require a country selection when the input is national. Browser locale or IP location is a hint, not consent to rewrite a number.

  • Plausible but unverified

    Say that the format is possible; do not label the number active, mobile, owned or opted in without separate evidence.

Test the workflow

Use the browser-only checker for normalization feedback, then review the validation guide before adding carrier, reachability or proof-of-control checks.

Standards and implementation sources

  1. ITU-T E.164: The international public telecommunication numbering planInternational Telecommunication Union. Verified 2026-07-19.
  2. ITU-T E.123: Notation for national and international telephone numbersInternational Telecommunication Union. Verified 2026-07-19.
  3. HTML Standard: Telephone state (type=tel)WHATWG. Verified 2026-08-19.
  4. RFC 3966: The tel URI for Telephone NumbersRFC Editor. Verified 2026-08-19.

See our editorial and sourcing methodology.