Standardize Phone Numbers in a CSV
Dialers and CRMs want one format. Real lists have a dozen. This example converts a fictional list and shows which numbers a careful tool refuses to touch.
What Usually Goes Wrong
โข US numbers written with brackets, dots, dashes and spaces
โข A leading 1 on some numbers and not on others
โข Extensions typed as ext. 22, x22 and #22
โข International numbers with + or 00
โข Seven-digit local numbers with no area code
The Sample File, Before
9 rows of fictional data with the problems above. Every person and company is invented.
Open This File in the Workspace Download the CSV
| Name | Phone | Alt Phone | Country |
|---|---|---|---|
| Imani Brooks | (212) 555-0101 | 212.555.0102 | US |
| Callum Fraser | 1-416-555-0103 | CA | |
| Yuki Tanabe | +81 3-5555-0104 | JP | |
| Sofia Lindqvist | 0046 8 555 010 5 | SE | |
| Darius Engel | 555-0106 | US | |
| Renata Coelho | +55 (11) 5555-0107 | BR | |
| Miles Abernathy | 2125550108 ext. 22 | (212) 555-0109 x7 | US |
| Fatima Zahra | 212 555 0110 | +1 212 555 0111 | US |
| Lucas Moreau | 01 55 55 01 12 | FR |
How to Clean It
1. Keep an untouched copy of the file.
2. Run it with Standardize phone numbers switched on. Both phone columns are picked up from their header names.
3. Read the review list for numbers that were not recognized.
4. For those rows, find the missing area or country code from the Country column or from the contact, and fix them by hand.
5. Export. In the workspace, choose the Excel export if the file will be opened in Excel, so the leading + is kept.
Prefer the command line or an AI agent? The same result comes from smartdata-clean clean phone-formats.csv --phones. See tools for agents.
The Result
9 rows in, 0 removed, 9 out. Ten-digit US and Canadian numbers become +1 followed by ten digits, extensions are kept as x22, and international numbers that start with + or 00 are tidied. The seven-digit number and the French number written in national format are left exactly as they were: without a country code, any conversion would be a guess.
| Name | Phone | Alt Phone | Country |
|---|---|---|---|
| Imani Brooks | +12125550101 | +12125550102 | US |
| Callum Fraser | +14165550103 | CA | |
| Yuki Tanabe | +81355550104 | JP | |
| Sofia Lindqvist | +4685550105 | SE | |
| Darius Engel | 555-0106 | US | |
| Renata Coelho | +551155550107 | BR | |
| Miles Abernathy | +12125550108 x22 | +12125550109 x7 | US |
| Fatima Zahra | +12125550110 | +12125550111 | US |
| Lucas Moreau | 01 55 55 01 12 | FR |
What the tool left for you
The tool listed this item for a person to check:
โข Phones not recognized, left unchanged: 2 (rows 6, 10)
Checked, not just claimed
The original file, the cleaned file and the change log were run through the separate verifier. Result: PASS.
โ Removed rows with a valid, verified reason: 0 of 0
โ Rows: 9 in, 0 removed with a logged reason, 9 out
โ Cells compared: 36; changed: 10; every change matched to the log: yes
โ Log entries: 10; not matching the files: 0
The verifier confirms that the change log explains every difference between the two files. It does not judge whether each cleaning choice suits your situation; that part is yours.
The cleaning report
Where a Tool Stops and a Person Starts
Completing local numbers from a country or region column, and validating numbers against a numbering plan, need per-country rules and review. Ask for a quote under Complex Cleanup.
See Service Levels From $19 How We Check Our Work
Standardizing format does not confirm that a number is in service.