CSV cleanup guide

How to Clean Up Phone Numbers in a CSV Before Import

Phone fields come in a mess of shapes. One bad shape can block a whole import. This guide shows you how to clean phone numbers in a CSV the safe way.

Why phone formats break imports

You get a list from a form. You get a list from a store. You get a list from an old sheet. Each list writes phone fields in its own way.

One row has dots. One row has bars. One row has a plus sign. One row has no area code at all.

Your next app sees all that. It wants one shape, not five. When the shapes do not match, it may balk. It may drop the row. It may store the phone in a odd way.

That is a big cost for a small flaw. A sales rep can not call the lead. A text tool can not send the text. A support team can not reach the client.

The flaw is not just looks. Some apps check the digit count. If the count is wrong, the row fails. If the count is right but marks stay in, the app may still fail.

This is one part of why CRM imports fail so often. The file looks fine to your eye. The app reads it in a strict way. That gap is where rows get lost.

You can fix this before you import. You do not need code. You need a clear rule and a calm pass. Pick one end shape. Move each row to that shape. Flag the rows you can not fix.

Do this work once, up front. It saves hours of hunt and fix work later. It also keeps bad data out of your main tool. Clean in, clean out. That rule holds for phone fields too.

Start by scanning the file. Look at the phone column from top to base. Note each shape you see. Do not fix rows one by one yet. First, get the full list of shapes.

Next, think about where the file will go. A CRM may want digits and a plus. A text tool may want the same. A sheet may want gaps for the eye. The end tool sets the rule. Clean for that tool, not for your eye.

Last, keep a copy of the raw file. Save it with a name like raw.csv. If a fix goes wrong, you can start fresh. That one habit saves a lot of stress.

What a clean US phone number looks like

US phone fields follow one plan. The plan has a name. It is the North American Numbering Plan. The Maine rules page lays out how it works.

A US number has ten digits. The first three are the area code. The rules call that part the NPA. The next three are the office code. The rules call that part the NXX. The last four are the line number.

So the shape is plain. Three plus three plus four. Ten digits in all. The FCC runs phone numbers in the US. That is the base you clean toward.

Many teams add a one in front. That one is the country code for the US. With the one, the field has 11 digits. With a plus sign, it reads as +1 and then ten digits.

Both forms can work. The key is to pick one. Use it for each row. Do not mix 10-digit rows and 11-digit rows. Mixed rows are what trip up tools.

For most imports, +1 plus ten digits is safe. It tells the tool the land of the number. It works for US and Canada rows too. It also helps when you add rows from other lands later.

If your tool wants just ten digits, use that. Strip the one and the plus. Keep the ten digits in the right order. Do not add gaps or dots if the tool wants plain digits.

+1 country 555 area 014 office 2280 line One clean US number, part by part Ten digits, plus the country code if you use it.
A clean US number has a country code, an area code, an office code, and a line number.

Write your end shape down. Put it at the top of your notes. Test one row in that shape first. Import that one row and check it. If it lands well, clean the rest the same way.

Watch for fake test rows too. Some lists use 555 numbers for tests. Those rows may be fine to drop. Ask the owner of the list if you are not sure. Do not guess on live client rows.

The shapes you will see in a real file

Real files are messy. That is normal. Names get typed by hand. Forms let folks type what they want. Old tools add their own marks.

You will see round marks and gaps. You will see dots in place of bars. You will see the country code on some rows. You will see it gone on the next rows.

You will see short rows. You will see long rows. You will see words where digits should be. You will see two numbers in one cell.

Each shape needs its own fix. Some fixes are fast and safe. Some rows need a flag, not a fix. The table below shows six common shapes.

In the fileWhat is wrongClean result
(555) 014-2280Marks and spaces+15550142280
555.014.2280Dots in place of bars+15550142280
1-555-014-2280Has country code+15550142280
555014228Too short. Flag it.Flag for review
555-014-2280 x12Has an extra part+15550142280, note x12
call meNot a number. Flag it.Flag for review

Look at the first three rows. They hold the same digits. They just wear distinct marks. Once you strip the marks, they match. That is the core job in most files.

Now look at the short row. It has just nine digits. You can not make up the tenth digit. A guess could ring the wrong home. Flag it and ask for the right digits.

The row with words is the same. Words are not a phone field. Leave the cell blank or flag the row. Do not try to turn words into digits.

The row with x12 is a split case. The main part is a full number. The x12 part adds more info. Most tools want that part in its own field. Move it out if you can. Note it in a side field if your tool has one.

You may see the same number twice. That is a dupe, not a shape flaw. Clean the shape first. Then check for dupes as a next step. Keep the steps apart so you can trace each fix.

How to clean phone numbers, step by step

You can clean phone numbers in a CSV in a short pass. Work in this order. Do not skip steps. Each step makes the next one safe.

Step 1: Save a raw copy

Copy the file first. Name the copy in a clear way. Work on the new file, not the raw one. If you slip, you still have the source.

Step 2: Pick one end shape

Choose +1 plus ten digits for most tools. Or choose plain ten digits if your tool asks. Write the choice down. Stick to it for the whole file.

Step 3: Strip marks and spaces

Take out round marks and bars. Take out dots and gaps. Take out most marks that are not digits. Keep a lead plus sign if you use it. The digits stay in the same order.

This is where a tool helps a lot. RowSift's phone cleanup does this strip step for you. It runs in your web tool, in the browser. It keeps a lead plus and drops the rest of the marks.

Step 4: Fix the country code

Look at rows with 11 digits. If the first digit is a one, that is the US code. Turn that one into +1 at the start. Look at rows with 10 digits. Add +1 if your end shape needs it.

Look at rows with more than 11 digits. They may hold a code from a far land. Or they may hold an extra part at the end. Split them and check each part. Do not just cut off the end.

Step 5: Flag rows that look wrong

Flag rows that are too short. Flag rows that are too long. Flag rows with words or odd signs. Flag rows with a blank where a phone must be.

A flag is not a fail. It is a note to check the row. It keeps bad rows out of the import. It gives you a short list to fix by hand.

Step 6: Check a small test import

Import ten clean rows first. Check each phone in the new tool. Call or text one test row if you can. If the test looks good, import the rest.

Keep the flag list.

Save flagged rows in a small file of their own. Send that file back to the source team. They can fix the digits at the source. That stops the same flaw next month.

Work slow on the first file. The next file will go much faster. You will know the shapes by sight. You will know which rows to flag at once.

Use the same steps each time. Same end shape. Same strip rule. Same flag rule. A fixed routine cuts slips and saves time.

One more tip helps a lot. Clean one column at a time. Do not fix names and phones in one pass. Small passes are easy to check. Big passes hide slips.

Country codes, extensions, and other edge cases

Most rows will be plain US rows. A few rows will not. Those few rows take most of your care. Treat them as edge cases, not as the norm.

Numbers from other lands

A lead plus sign helps here. The plus means the code comes first. Each land has its own code. The code can be one, two, or three digits.

Do not add +1 to a row from a far land. That would change the number. If the row has a plus, keep it. If it has no plus and looks long, pause. Ask where the client lives. Clean it once you know the land.

Digit counts shift by land too. Ten digits is the US rule. Other lands use more or less. Do not flag a row just for its length. Flag it if the length fits no land you serve.

Extensions and extra parts

Some rows add a short part at the end. Folks write it as x12 or ext. 12. That part routes the call in a big firm. It is not part of the main number.

Most import tools have no field for it. If yours does, move the part there. If yours does not, add a note field. Keep the main number clean and plain. Do not leave the x part stuck to the digits.

If the extra part is long, look twice. It may be a second phone in the same cell. Split the cell into two fields if so. Check with the source if you can.

Vanity numbers and letters

Some firms use words in their number. A sign might read a word, not digits. In a client list, that form is rare. If you see letters, check if they map to digits. Most key pads show which digit each letter maps to.

When in doubt, flag the row. Do not guess a word to digit swap. A wrong swap rings the wrong place. A flag keeps the row safe for review.

Blank, fake, and test rows

Test rows slip into live files. They may use 555 in the middle part. They may have a name like Test or Demo. Drop test rows from a live import. Keep them in a test file if you need them.

Blank rows need no fix. Leave the phone cell blank. Your tool can import a blank. It can not import a fake set of zeros. Blank is true. Fake is a lie in your data.

How RowSift normalizes phone fields

RowSift is a tool that runs in your browser. You drop in a CSV file. You pick the phone column. It then cleans that column in one pass.

It strips spaces from each row. It strips marks like bars and dots. It keeps a lead plus sign. So +1 rows stay in +1 form. Plain rows stay as plain digits.

It flags rows that look wrong. A row that is too short gets a flag. A row with words gets a flag. A row that is too long gets a flag. You see the flags before you save.

You then export a clean CSV. The clean file has one phone shape. The flagged rows stay marked for you. You can fix them or set them aside. Then you import the clean file to your tool.

This pairs well with other clean steps. For a full list scrub, see how to clean a HubSpot contact list in one flow. Phones are one column in that flow. Names, mails, and dates get the same care.

RowSift does not make up digits. It does not guess a lost area code. It does not turn words into a number. Those rows get a flag, not a fake fix. That is by design. A flag is safe. A guess is not.

Your file stays in your browser. The tool does the work on your screen. You export the file when you are done. Check the clean file once more before import. A quick scan of ten rows is wise.

Clean phone fields pay off fast. Reps reach more leads. Texts land on real phones. Support calls go to the right home. All from one calm pass before import.

Sources and further reading