Format

Modified on Wed, 12 Jul, 2023 at 10:44 AM

Format allows you to format emails, phone numbers, postcodes and URL's to a standardised structure.

Formatting refers to the organization of data according to pre-set specifications e.g. making sure an email only has one '@' symbol present.


Email

Input one or more Email Addresses and return them in the correct format (if possible).

For example, you can choose to format email to remove extra '@' symbols or an incorrectly input suffix. E.g.

EmailFormatted Email
example@example.comexample@example.com
example@@example.comexample@example.com
example@example..comexample@example.com

Phone

International

Input one or more International Telephone Numbers and return them in the correct format (if possible).

For example, you can choose to format telephone numbers in the International standard to assign a country code to a telephone number, remove any unnecessary characters and add spacing. E.g.

TelephoneCountry Identifier - ISO 2Formatted Telephone
1234567891GB+44 1234 567891
12.23.34.45.56GB+44 1223 344556
111-222-333-4GB+44 111 222 3334

National

Input one or more National Telephone Numbers and return them in the correct format (if possible).

For example, you can choose to format telephone numbers in the National standard to assign the correct prefix to a telephone number, remove any unnecessary characters and add spacing. E.g.

TelephoneCountry Identifier - ISO 2Formatted Telephone
1234567891GB01234 567891
12.23.34.45.56GB01223 344556
111-222-333-4GB0111 222 3334

E164

Input one or more Telephone numbers along with a country identifier and return them in the E164 standard (if possible).

For example, you can choose to format telephone numbers in the E164 standard to assign a country code to a telephone number as well as remove any unnecessary characters. E.g.

TelephoneCountry Identifier - ISO 2Formatted Telephone
1234567891GB+441234567891
12.23.34.45.56GB+441223344556
111-222-333-4GB+441112223334

RFC 3966

Input one or more Telephone Numbers and return them in the RFC 3966 standard format (if possible).

For example, remove unnecessary and incorrect characters and return them in the desired format. E.g.

TelephoneCountry Identifier - ISO 2Formatted Telephone
1234567891GBtel:+44-1234-567891
12.23.34.45.56GBtel:+44-1223-344556
111-222-333-4GBtel:+44-111-222-3334

Postcode

Input one or more postcodes along with a country identifier and return them in the correct format (if possible).

For example, you can choose to format postcodes to identify misinput characters and remove them. E.g.

PostcodeCountry Identifier - ISO 2Formatted Postcode
P/O1£3 9FUGBPO13 9FU
PO.13 9F.UGBPO13 9FU
P-O-1-3-9-F-UGBPO13 9FU

URL Address

Input one or more URL Addresses along with their prefixes and return them in the correct format (if possible).

For example, remove incorrect characters such as commas or duplicate full stops. E.g.

URL AddressURL PrefixFormatted URL Address
microsoft..comwww.www.microsoft.com
microsoft,,comwww.www.microsoft.com
microsoft,.comwww.www.microsoft.com

Dialling Codes

Below is a selection of dialling codes for reference.

Worldwide

CountryCountry CodeInternational PrefixNational PrefixNational Number
Afghanistan+93009 digits
Albania+355003 to 9 digits
Algeria+213008, 9 digits
American Samoa+1111(684)+7 digits
Andorra+3760…6, 8, 9 digits
Angola+244009 digits
Anguilla+1111(264)+7 digits
Antigua and Barbuda+1111(268)+7 digits
Argentina+540010 digits
Armenia+374008 digits
Aruba+2970…7 digits
Australia+611105 to 15 digits
Australian External Territories+672006 digits
Austria+43004 to 13 digits
Azerbaijan+994008 to 9 digits
Bahamas+1111(242)+7 digits
Bahrain+9730…8 digits
Bangladesh+880006 to 10 digits
Barbados+1111(246)+7 digits
Belarus+37581089 to 10 digits
Belgium+32008 to 9 digits
Belize+5010…7 digits
Benin+2290…8 digits
Bermuda+1111(441)+7 digits
Bhutan+9750…7 to 8 digits
Bolivia (Plurinational State of)+591008 digits
Bonaire, Sint Eustatius and Saba+599007 digits
Bosnia and Herzegovina+387008 digits
Botswana+2670…7 to 8 digits
Brazil+550010 digits
British Virgin Islands+1111(284)+7 digits
Brunei Darussalam+6730…7 digits
Bulgaria+359007 to 9 digits
Burkina Faso+2260…8 digits
Burundi+2570…8 digits
Cambodia+855001, 00708 digits
Cameroon+2370…8 digits
Canada+111110 digits
Cape Verde+2380…7 digits
Cayman Islands+1111(345)+7 digits
Central African Rep.+2360…8 digits
Chad+2350…8 digits
Chile+561YZ01YZ8 to 9 digits
China+86005 to 12 digits
Colombia+57005/007/009/555/99903/05/07/098, 10 digits
Comoros+2690…7 digits
Congo+2420…9 digits
Cook Islands+6820…5 digits
Costa Rica+5060…8 digits
Côte d'Ivoire+2250…8 digits
Croatia+385008 to 12 digits
Cuba+5311906 to 8 digits
Curaçao+599007 to 8 digits
Cyprus+3570…8, 11 digits
Czech Rep.+4200…4 to 12 digits
Dem. People's Rep. of Korea+850006 to 17 digits
Dem. Rep. of the Congo+243005 to 9 digits
Denmark+450…8 digits
Diego Garcia+2460…7 digits
Djibouti+2530…6 digits
Dominica+1111(767)+7 digits
Dominican Rep.+1111(809/829)+7 digits
Ecuador+593008 digits
Egypt+20007 to 9 digits
El Salvador+5030…7, 8, 11 digits
Equatorial Guinea+2400…9 digits
Eritrea+291007 digits
Estonia+3720…7 to 10 digits
Ethiopia+251009 digits
Falkland Islands (Malvinas)+5000…5 digits
Faroe Islands+2980…6 digits
Fiji+6790…7 digits
Finland+35800/990/994/99905 to 12 digits
France+33009 digits
French Dep. and Territories in the Indian Ocean+2620…9 digits
French Guiana+5940…9 digits
French Polynesia+6890…6 digits
Gabon+2410…6, 7 digits
Gambia+2200…7 digits
Georgia+995009 digits
Germany+49006 to 13 digits
Ghana+233005 to 9 digits
Gibraltar+3500…8 digits
Global Mobile Satellite System (GMSS), shared+881
Greece+300010 digits
Greenland+2990…6 digits
Grenada+1111(473)+7 digits
Group of countries, shared code+388
Guadeloupe+5900…9 digits
Guam+1111(671)+7 digits
Guatemala+5020…8 digits
Guinea+2240…8 digits
Guinea-Bissau+2450…7 digits
Guyana+5921…7 digits
Haiti+5090…8 digits
Honduras+5040…8 digits
Hong Kong, China+8521…4, 8 to 9 digits
Hungary+36068 to 9 digits
Iceland+3540…7, 9 digits
India+91007 to 10 digits
Indonesia+62001/00805 to 10 digits
Inmarsat SNAC+8700…9 digits
International Freephone Service+800……8 digits
International Networks, shared code+882
International Networks, shared code+883
International Premium Rate Service (IPRS)+979……9 digits
International Shared Cost Service (ISCS)+808……8 digits
Iran (Islamic Republic of)+98006 to 10 digits
Iraq+964008 to 10 digits
Ireland+353007 to 11 digits
Israel+97200/012/013/01408 to 9 digits
Italy+390…up to 11 digits
Jamaica+1111(876)+7 digits
Japan+811005 to 13 digits
Jordan+962005 to 9 digits
Kazakhstan+7810810 digits
Kenya+254006 to 10 digits
Kiribati+6860…5 digits
Korea (Rep. of)+82001/002/007000/0828 to 11 digits
Kuwait+9650…7, 8 digits
Kyrgyzstan+996009 digits
Lao P.D.R.+856008 to 10 digits
Latvia+3710…7, 8 digits
Lebanon+961007 to 8 digits
Lesotho+2660…8 digits
Liberia+2310…7 to 8 digits
Libya+218008 to 9 digits
Liechtenstein+4230…7 to 9 digits
Lithuania+370008 digits
Luxembourg+3520…4 to 11 digits
Macao, China+8530…7 to 8 digits
Madagascar+2610…9 to 10 digits
Malawi+2650…7, 8 digits
Malaysia+60007 to 9 digits
Maldives+9600…7 digits
Mali+2230…8 digits
Malta+3560…8 digits
Marshall Islands+6921117 digits
Martinique+5960…9 digits
Mauritania+2220…7 digits
Mauritius+2300…7 digits
Mexico+520110 digits
Micronesia+6911117 digits
Moldova (Republic of)+373008 digits
Monaco+3770…5 to 9 digits
Mongolia+976107 to 8 digits
Montenegro+382004 to 12 digits
Montserrat+1111(664)+7 digits
Morocco+212009 digits
Mozambique+2580…8 to 9 digits
Myanmar+95007 to 9 digits
Namibia+264006 to 10 digits
Nauru+6740…4, 7 digits
Nepal+977008 to 9 digits
Netherlands+31009 digits
New Caledonia+6870…6 digits
New Zealand+64003 to 10 digits
Nicaragua+5050…8 digits
Niger+2270…8 digits
Nigeria+234907 to 10 digits
Niue+6830…4 digits
Northern Marianas+1111(670)+7 digits
Norway+470…5, 8 digits
Oman+9680…7 to 8 digits
Pakistan+92008 to 11 digits
Palau+68011…7 digits
Panama+5070…7, 8 digits
Papua New Guinea+6750…4 to 11 digits
Paraguay+595005 to 9 digits
Peru+51008 to 11 digits
Philippines+63008 to 10 digits
Poland+48006 to 9 digits
Portugal+3510…9, 11 digits
Puerto Rico+1111(787/939)+7 digits
Qatar+9740…3 to 8 digits
Romania+40009 digits
Russian Federation+7810810 digits
Rwanda+2500…9 digits
Saint Helena, Ascension and Tristan da Cunha+2470…4 digits
Saint Helena, Ascension and Tristan da Cunha+2900…4 digits
Saint Kitts and Nevis+1111(869)+7 digits
Saint Lucia+1111(758)+7 digits
Saint Pierre and Miquelon+5080…6 digits
Saint Vincent and the Grenadines+1111(784)+7 digits
Samoa+6850…3 to 7 digits
San Marino+3780…6 to 10 digits
Sao Tome and Principe+2390…7 digits
Saudi Arabia+966008 to 9 digits
Senegal+2210…9 digits
Serbia+381004 to 12 digits
Seychelles+2480…7 digits
Sierra Leone+232008 digits
Singapore+65001/002/008/012/013/018/019…8 to 12 digits
Sint Maarten (Dutch part)+1111(721) + 7 digits
Slovakia+421004 to 9 digits
Slovenia+386008 digits
Solomon Islands+6770…5 digits
Somalia+2520…5 to 8 digits
South Africa+27009 digits
South Sudan+21100
Spain+340…9 digits
Sri Lanka+94009 digits
Sudan+249009 digits
Suriname+597006 to 7 digits
Swaziland+2680…7 to 8 digits
Sweden+46007 to 13 digits
Switzerland+41004 to 12 digits
Syrian Arab Republic+963008 to 10 digits
Taiwan, China+886208 to 9 digits
Tajikistan+9928~1089 digits
Tanzania+255009 digits
Telecommunications for Disaster Relief (TDR)+888
Thailand+66108, 9 digits
The Former Yugoslav Republic of Macedonia+389008 digits
Timor-Leste+6700…7 digits
Togo+2280…8 digits
Tokelau+6900…4 digits
Tonga+6760…5, 7 digits
Trial of a proposed new international service+991
Trinidad and Tobago+1111(868)+7 digits
Tunisia+2160…8 digits
Turkey+900010 digits
Turkmenistan+99381088 digits
Turks and Caicos Islands+101(649)+7 digits
Tuvalu+6880…5, 6 digits
Uganda+256009 digits
Ukraine+380009 digits
United Arab Emirates+971008 to 9 digits
United Kingdom+44007 to 10 digits
United States+111110 digits
United States Virgin Islands+1111(340)+7 digits
Universal Personal Telecommunication (UPT)+878
Uruguay+598004 to 11 digits
Uzbekistan+99881089 digits
Vanuatu+6780…5, 7 digits
Vatican+379…
Vatican+390…up to 11 digits
Venezuela (Bolivarian Republic of)+580010 digits
Viet Nam+84007 to 10 digits
Wallis and Futuna+6810…6 digits
Yemen+967006 to 9 digits
Zambia+260009 digits
Zimbabwe+263005 to 10 digits

United States Area Codes

STATEAREA CODES
Alabama205, 251, 256, 334, 938
Alaska907
Arizona479, 501, 870
Arkansas479, 501, 870
California209, 213, 279, 310, 323, 341, 408, 415, 424, 442, 510, 530, 559, 562, 619, 626, 628, 650, 657, 661, 669, 707, 714, 747, 760, 805, 818, 820, 831, 858, 909, 916, 925, 949, 951
Colorado303, 719, 720, 970
Connecticut203, 860, 475, 959
Delaware302
Florida239, 305, 321, 352, 386, 407, 561, 686, 727, 754, 772, 786, 813, 850, 863, 904, 941, 954
Georgia229, 404, 470, 478, 678, 706, 762, 770, 912
Hawaii808
Idaho208, 986
Illinois217, 224, 309, 312, 331, 618, 630, 708, 773, 779, 815, 847, 872
Indiana219, 260, 317, 574, 765, 812, 930
Iowa319, 515, 563, 641, 712
Kansas316, 620, 785, 913
Kentucky270, 364, 502, 606, 859
Louisiana225, 318, 337, 504, 985
Maine207
Maryland240, 301, 410, 443, 667
Massachusetts339, 351, 413, 508, 617, 774, 781, 857, 978
Michigan231, 248, 269, 313, 517, 586, 616, 734, 810, 906, 947, 989, 679
Minnesota218, 320, 507, 612, 651, 763, 952
Mississippi228, 601, 662, 769
Missouri314, 417, 573, 636, 660, 816
Montana406
Nebraska308, 402, 531
Nevada702, 725, 775
New Hampshire603
New Jersey201, 551, 609, 640, 732, 848, 856, 862, 908, 973
New Mexico505, 575
New York212, 315, 332, 347, 516, 518, 585, 607, 631, 646, 680, 716, 718, 838, 845, 914, 917, 929, 934
North Carolina252, 336, 704, 743, 828, 910, 919, 980, 984
North Dakota701
Ohio216, 234, 326, 330, 380, 419, 440, 513, 567, 614, 740, 937, 220
Oklahoma405, 580, 918, 539
Oregon503, 541, 971, 458
Pennsylvania215, 223, 267, 272, 412, 484, 610, 717, 724, 814, 878
Rhode Island401
South Carolina803, 843, 854, 864
South Dakota605
Tennessee423, 615, 629, 731, 865, 901, 931
Texas210, 214, 254, 281, 325, 346, 361, 409, 430, 432, 469, 512, 682, 713, 726, 737, 806, 817, 830, 832, 903, 915, 936, 940, 956, 972, 979
Utah435, 801, 385
Vermont802
Virginia276, 434, 540, 571, 703, 757, 804
Washington206, 253, 360, 425, 509, 564
West Virginia304, 681
Wisconsin262, 414, 608, 534, 715, 920, 274
Wyoming307

Custom Functions

DQ.FORMAT_EMAIL

The DQ.FORMAT_EMAIL function formats an email. It will return the original input if failed.

Parameters:

email (string), email to be formatted

returns (string), formatted email

DQ.FORMAT_POSTCODE

The DQ.FORMAT_POSTCODE function formats a postcode.

Parameters:

postcode (string), postcode to be formatted

country (string), country identifier, preferred format is ISO2, otherwise the service will attempt to derive country from the input

returns (string), formatted postcode

DQ.FORMAT_TELEPHONE_E164

The DQ.FORMAT_TELEPHONE_E164 function formats a postcode.

Parameters:

telephone (string), telephone to be formatted

country (string), country identifier, preferred format is ISO2, otherwise the service will attempt to derive country from the input

returns (string), formatted telephone

DQ.FORMAT_TELEPHONE_INTERNATIONAL

The DQ.FORMAT_TELEPHONE_INTERNATIONAL function formats a telephone number to international standard (E. 123).

Parameters:

telephone (string), telephone to be formatted

country (string), country identifier, preferred format is ISO2, otherwise the service will attempt to derive country from the input

returns (string), formatted telephone

DQ.FORMAT_TELEPHONE_NATIONAL

The DQ.FORMAT_TELEPHONE_NATIONAL function formats a telephone number to national standard.

Parameters:

telephone (string), telephone to be formatted

country (string), country identifier, preferred format is ISO2, otherwise the service will attempt to derive country from the input

returns (string), formatted telephone

DQ.FORMAT_TELEPHONE_RFC_3966

The DQ.FORMAT_TELEPHONE_RFC_3966 function formats a telephone number to RFC.3966 standard.

Parameters:

telephone (string), telephone to be formatted

country (string), country identifier, preferred format is ISO2, otherwise the service will attempt to derive country from the input

returns (string), formatted telephone

DQ.FORMAT_URL

The DQ.FORMAT_URL function formats a URL.

Parameters:

url (string), URL to be formatted

prefix (string), prefix of the URL

returns (string), formatted URL

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article