Phone formatting

Format a phone number using reviewed country rules

Normalizes an international number or converts a national-format number when a supported two-letter country code is supplied. Processing is ephemeral. This is formatting and plausibility guidance, not a live carrier, HLR/HSS, MNP, ownership, reachability, or consent check.

post/api/phone/format

Request

  • Base URL: https://www.countrycalling.codes
  • URL: https://www.countrycalling.codes/api/phone/format
  • Auth: none required

Request body

phoneNumberstring required

Number to format. The value is processed ephemerally and is not stored.

countryCodestring

Optional ISO 3166-1 alpha-2 context for national-format input.

Example request

{
  "phoneNumber": "(020) 7946 0123",
  "countryCode": "GB"
}

Response

Formatting or ambiguity result.

metaobject required
inputobject required
limitationsstring[] required

Changes

No recorded changes to this operation across all 1 revision of this API.