Free · Runs in your browser · Nothing uploaded

Remove duplicates and clean data for Excel

Clean data in Excel and CSV files: trim extra spaces, remove duplicates, fix dates and numbers, and split or merge columns. Load a file, switch cleaning rules on or off, check the preview, and download a new file. Your file is read in your browser and is never uploaded or stored. The original is not changed.

  • No sign-up or install
  • Preview every change
  • Original file untouched
  • Works on Windows and Mac
A messy table with extra spaces, mixed date formats and a duplicate row, and the same table after cleaning with uniform names, dates and amounts

How it works

Three steps. Nothing leaves your computer.

A CSV file being dropped into the cleaner

1 Load your data

Choose a CSV or text file, or paste columns copied from Excel. The first row holds the column names.

Cleaning rules shown as on and off switches

2 Pick the rules

Switch rules on or off and set each column. The preview updates as you go, with changed cells shaded.

A cleaned CSV file ready to download

3 Download the clean file

Get a new CSV that opens in Excel. Save your settings to repeat the same cleaning next month.

Clean your data

Up to 5 MB and 100,000 rows. Everything happens in this browser tab.

1 Your data

What it cleans

The problems that stop lookups, sorting and pivot tables from working.

Extra spaces

" ana PEREZ "→Ana Perez

Hidden characters

Smith·¶→Smith

Dates stored as text

3 Apr 2026→2026-04-03

Numbers stored as text

(1,200.50)→-1200.50

Duplicate rows

2 × Ana Perez→1 × Ana Perez

Split and merge

Ana Perez→Ana | Perez

Data cleansing in Excel: what goes wrong and how to fix it

Most messy spreadsheets have the same handful of problems: spaces you cannot see, text that looks like a number or a date but is not, the same customer typed three ways, and columns that hold two things at once. This guide shows the Excel formula or menu command for each problem, and how the Data Cleaner above does the same job on a whole file in one pass. Data cleaning is the first step before sorting, lookups, pivot tables and charts, because those all depend on values matching exactly.

How to remove extra spaces in Excel

Spaces at the start or end of a cell, or two spaces between words, make identical-looking values different. A lookup for "Smith" will not find "Smith ". The fix is the TRIM function: =TRIM(A2) removes leading and trailing spaces and reduces any run of spaces between words to one. Put it in a helper column, fill it down, then copy the results and paste them back as values. In the Data Cleaner, the option Trim spaces does this for every column at once.

How to remove non-breaking spaces (CHAR 160)

If TRIM seems to do nothing, the spaces are probably non-breaking spaces, character code 160. They appear when text is copied from web pages and some systems, and TRIM only handles the ordinary space, code 32. Replace them first: =TRIM(SUBSTITUTE(A2,CHAR(160)," ")). The Data Cleaner turns non-breaking spaces into ordinary spaces under Remove odd characters, then trims.

A cell that looks like Smith but contains an ordinary space before it and a non-breaking space after it, which TRIM does not remove
Two cells can look identical and still not match, because of spaces you cannot see.

How to remove line breaks from cells

A line break inside a cell comes from Alt+Enter or from an imported file, and is character 10 (sometimes 13 as well). To replace it with a space, use =TRIM(SUBSTITUTE(SUBSTITUTE(A2,CHAR(13)," "),CHAR(10)," ")). Do not rely on CLEAN alone for this: it deletes the line break without adding a space, so the last word of one line can run into the first word of the next. In the Data Cleaner, tick Replace line breaks.

How to remove non-printing characters

Imported data can carry control characters that you cannot see but that break matching and sorting. =CLEAN(A2) removes the first 32 characters of the ASCII set (codes 0 to 31). It does not remove every invisible Unicode character, such as the zero-width space. The Data Cleaner removes control characters and zero-width characters together under Remove odd characters.

How to remove duplicates in Excel

In Excel, select the data and choose Data, Remove Duplicates, then tick the columns that define a duplicate. Excel keeps the first match and deletes the others, and the comparison ignores capital letters. Two habits make this safer: work on a copy, and clean spaces first, because "Ana Perez" and "Ana Perez " are not duplicates until the extra space is gone. To see duplicates without deleting them, flag them with =COUNTIF($A$2:A2,A2)>1. The Data Cleaner shows the rows it would remove, with the reason, before you download.

A preview table where a repeated customer row is struck through and marked duplicate, while the first row is marked kept
Duplicates are listed for you to check before anything is removed.

How to change text case in Excel

=UPPER(A2), =LOWER(A2) and =PROPER(A2) change the case of text. PROPER capitalises the first letter after any character that is not a letter, so "o'brien" becomes "O'Brien" but "mcdonald" becomes "Mcdonald". The Data Cleaner offers lower, upper and title case for each column and shows the result before you commit.

How to convert text to numbers and dates in Excel

Numbers stored as text sit on the left of the cell, are ignored by SUM, and sort wrongly. =VALUE(A2) converts them, but it fails on currency symbols, trailing spaces or a decimal comma. Dates stored as text are harder: =DATEVALUE(A2) follows your computer's regional settings, so 03/04/2026 can mean 3 April or 4 March. The safe route is to decide the order yourself. The Data Cleaner converts a column to numbers (handling symbols, brackets for negatives and either decimal mark) or to dates (you choose day-first or month-first) and warns you about any date that could be read both ways. For a formula that builds real dates from text, see the Date Helper.

The text 03/04/26 read day first as 3 April 2026 or month first as 4 March 2026
The same text can be two different dates. You choose which order your file uses.

How to split and combine columns in Excel

To split a full name or an address into parts, use Data, Text to Columns, or =TEXTSPLIT(A2," ") in current Microsoft 365. To combine columns, use =TEXTJOIN(", ",TRUE,A2:B2) (Excel 2019 and later), which skips empty cells. The Data Cleaner has Split a column and Merge columns steps, plus Wide table to flat list, which turns a column per month into one row per month so it is ready for a pivot table.

The best order for cleaning data in Excel

  1. Remove non-breaking spaces and non-printing characters.
  2. Trim spaces, and replace line breaks if you do not want them.
  3. Fix text case.
  4. Convert text to numbers and dates.
  5. Remove empty rows and duplicates.
  6. Split or merge columns, and reshape the table.

This is the order the Data Cleaner follows. Duplicates come after the other steps so that values that only differed by spacing or case are already identical.

Excel formulas or the Data Cleaner?

JobIn ExcelIn the Data Cleaner
Extra spacesTRIM in a helper columnOne option, all columns
Non-breaking spacesSUBSTITUTE with CHAR(160)Remove odd characters
Line breaksSUBSTITUTE with CHAR(10)One option
DuplicatesData, Remove Duplicates (permanent)Preview of removed rows first
Text caseUPPER, LOWER, PROPERPer column setting
Text to dateDATEVALUE (regional settings)You choose day-first or month-first
Repeat next monthRedo the formulasSave the settings and reload them

Formulas are best when the data stays inside your workbook and updates live. A tool is quicker for a one-off export or a file you receive every month. Whichever you use, keep the original file and check a sample of rows afterwards. To practise these functions on exercises with feedback, try Excel Practice Sheets.

Questions about cleaning data in Excel

How do I clean data in Excel?

Work in a fixed order. First remove extra spaces and hidden characters, then fix text case, then convert text that should be numbers or dates, and only then remove duplicates and split or merge columns. Doing duplicates last means values that differed only by stray spaces are already identical.

How do I remove extra spaces in Excel?

Use =TRIM(A2) in a helper column. TRIM removes spaces at the start and end of the text and reduces runs of spaces between words to one. Copy the results and paste them as values over the original column.

Why does TRIM not remove all the spaces in my data?

Spaces copied from web pages and other systems are often non-breaking spaces, character code 160, which TRIM ignores. Replace them first with =SUBSTITUTE(A2,CHAR(160)," ") and then apply TRIM.

How do I remove duplicates in Excel without losing data?

Copy the data to a new sheet or save a copy first, clean spaces and case, then use Data, Remove Duplicates and choose the columns that define a duplicate. Excel keeps the first row it finds and deletes the rest. A cleaning tool that previews the rows to be removed lets you check before anything is deleted.

Is my data uploaded when I use this Data Cleaner?

No. The file is read and cleaned in your browser on your own device. It is not sent to a server or stored, and your original file is not changed. You download a new file.

Is the Data Cleaner free, and does it work on Mac?

The tool is free and runs in a web browser, so it works on Mac and Windows. There is nothing to install.

Can I clean a CSV file without opening Excel?

Yes. Load the CSV into the Data Cleaner, choose the rules, check the preview, and download the cleaned CSV. Excel can then open it.

Ready to clean your file?

Free, private and quick. Your data never leaves your computer.

Clean my data