Developer Tools

Phone Number Formatter

Phone number formatter for UAE, India, Saudi, Kuwait, Qatar, Bahrain, Oman and Pakistan mobiles: get clean numbers with the country code first.

Select Country
Input Numbers

This phone number formatter converts lists of mobile numbers from the UAE, India, Saudi Arabia, Kuwait, Qatar, Bahrain, Oman and Pakistan into one format: digits only, country code first, with no plus sign, spaces or leading zero. Paste numbers one per line or comma-separated, or upload a CSV, XLS or XLSX file. Entries that fail every selected country's rules are dropped, and numbers that end up identical are kept once.

How to use the phone number formatter

  1. Under Select Country, click each country your list contains. You can select several.
  2. Choose Paste Numbers and enter the numbers, or choose Upload File and drop a CSV, XLS or XLSX file with a Numbers column.
  3. Press Format Numbers.
  4. Check the Results cards: Total Input, Valid Numbers, Invalid / Skipped and Duplicates Removed.
  5. Press Copy All, or Download CSV to save formatted-numbers.csv with a single Numbers column.

Example: a mixed UAE and India list

With UAE and India selected, this input:

050 123 4567
+971 50 123 4567
00971 55 987 6543
04 123 4567
98765 43210

gives:

971501234567
971559876543
919876543210

The results panel counts 5 inputs, 3 valid, 1 invalid and 1 duplicate removed. The first two lines are the same number, and the 00 international prefix on the third is stripped. 04 123 4567 is a landline, so it matches neither country's mobile pattern.

Phone number format with country code

The output is the E.164 number without its plus sign. E.164 is the ITU numbering plan used by phone networks and most messaging APIs: the country code, then the national number with any trunk zero removed, at most 15 digits in all. The same UAE mobile can be written several ways:

StyleExample
Local, as dialled in the UAE050 123 4567
International, for people to read+971 50 123 4567
E.164+971501234567
This tool's output971501234567

The plain-digit form is what WhatsApp click-to-chat links take, as in wa.me/971501234567. A tel: link or a call QR code made with the QR code generator wants the plus, as in tel:+971501234567.

The formatter does not handle the US phone number format or any country outside the eight in the selector. For reference, a US number in E.164 is +1 followed by the 10-digit number, so (202) 555-0123 becomes +12025550123.

Number patterns the tool accepts

CountryCodeNational number
UAE9719 digits starting 50 or 52 to 58
India9110 digits starting 6, 7, 8 or 9
Saudi Arabia9669 digits: 5, then any digit except 2
Kuwait9658 digits starting 5, 6 or 9
Qatar9748 digits starting 3, 5, 6 or 7
Bahrain9738 digits starting 3, 663 or 669
Oman9688 digits starting 9
Pakistan9210 digits starting 3

Spaces, brackets, dashes and a + are ignored. A leading 0 before the national number is accepted for the UAE, India, Saudi Arabia and Pakistan. To check numbers in your own code with the same rule, try a pattern such as ^9715[02345678]\d{7}$ for UAE output in the regex tester.

Uses and things to check

Typical jobs for the phone number formatter are cleaning a contact export before a CRM or bulk SMS import and building wa.me chat links. To send the cleaned list to an API that expects JSON, run formatted-numbers.csv through the CSV to JSON converter; the guide to converting CSV to JSON without uploading walks through it.

  • With several countries selected, each number is tested in the order the countries were clicked and the first match wins. 55123456 becomes 96555123456 when Kuwait was picked before Qatar, and 97455123456 the other way round.
  • An Indian number typed without a prefix that begins with 91, such as 9123456789, is read as having country code 91 and rejected. Add +91 or a leading 0 to these.
  • A number carrying the code of a country you did not select counts as invalid.
  • Excel shows numbers of 12 or more digits in General format as scientific notation, so 971501234567 can appear as 9.71501E+11. The digits are intact; set the column to Number with no decimals, or import it as text.

Other list and data tools are in the developer tools section.

Frequently Asked Questions

Why do the formatted phone numbers have no plus sign?
Each result is a plain run of digits such as 971501234567. If a system needs E.164 format with the plus sign, add a + at the start of every line in a spreadsheet or text editor. The country code already comes first and any trunk zero has been removed, so the digits themselves need no further change.
What column name does an uploaded CSV or Excel file need?
Head the column Numbers, Number, Phone or Mobile, in any capitalisation. Without one of those headers, a CSV is read line by line and an Excel file has every non-empty cell treated as a number, which can pull in other columns. Only the first worksheet of an XLS or XLSX file is read, and CSV rows are split on plain commas, so quoted fields that contain commas break.
Does the tool list the phone numbers it rejected?
Rejected entries are counted under Invalid / Skipped but not listed. The output box and the CSV download hold only the numbers that passed, in the order they first appeared. To track down the rejects, check the source list against the accepted pattern for each country. Most rejections are landlines or numbers with too many or too few digits.
Are uploaded contact lists sent to a server?
No. CSV files are read with the browser's FileReader, Excel files are parsed by the SheetJS library running inside the page, and the cleaning is done by JavaScript on your device. The SheetJS script is fetched from its CDN when the page loads, but your file is never sent with it, and the CSV download is generated locally.
Does the phone number formatter accept landlines?
No. Each country rule matches mobile ranges only, so an Abu Dhabi number written as 02 123 4567 or a Riyadh number written as 011 123 4567 counts as invalid. Numbers from countries outside the eight in the selector are not supported in any format, even when they carry a correct international code.