0151 355 4555



Converts a telephone number to its standard format.

The service returns the telephone number formatted according to a number of options as described below. The default combination of these options means that input telephone numbers are treated as UK unless they include a country code, and UK numbers are formatted using national dialling rules (e.g. 0151 355 4555) while all other countries are formatted using international dialling rules (e.g. +1 800 555 1234).


The country code (without leading + or 00) that telephone numbers are assumed to be from if no country code is included in the input telephone number. This option defaults to 44.

The format the telephone number should be returned in. This can be one of the following values:

  • International - the number is presented back with full international dialling code
  • National - the number is presented back without the international dialling code but with the full area code
  • Local - the number is presented back with only the local part

This option defaults to International.

A comma-separated list of country codes (without leading + or 00). Any telephone numbers for these countries will be formatted using the DifferentFormatType format instead of the DefaultFormatType. This option defaults to 44.

The format the telephone number should be returned in if it is from a country listed in DifferentFormatCountries. This can be one of the same set of values as DefaultFormatType. This option defaults to National.

Indicates if telephone numbers should be formatted according to the country-specific rules for its particular country. If this is set to false, numbers are formatted according to ITU international standard formatting. This option defaults to true.

View all Telephone Number Formatting methods

Code Samples

<!-- Import the Integr8 Ajax API -->
<!-- NOTE: Get your own API key to use in the following script tag from: -->
<!-- http://www.data-8.co.uk/integr8/Admin/Ajax.aspx -->
<script src="http://webservices.data-8.co.uk/Javascript/Loader.ashx?key=your-api-key" type="text/javascript">

<script type="text/javascript">

function loadIntegr8() {
  // Load the TelephoneFormatting Integr8 service

function FormatTelephoneNumber(number) {
  /// <param name="number">string</param>
  var telephoneformatting = new data8.telephoneformatting();

function showFormatTelephoneNumberResult(result) {
  // Check that the call succeeded, and show the error message if there was a problem.
  if (!result.Status.Success) {
    alert('Error: ' + result.Status.ErrorMessage);
  else {
    // TODO: Process method results here.
    // Results can be extracted from the following fields:
    // result.FormattedNumber
    //   Contains the formatted version of the supplied number.