CSV cleaner
Paste or open a CSV or TSV file, switch cleaning steps on and off, and see every changed cell highlighted before you download. Your file stays on your device.
-
Removes spaces, tabs and invisible zero-width characters from the start and end of every cell and column name.
3 cells trimmed.
-
Turns runs of spaces, tabs and non-breaking spaces inside a cell into one ordinary space. Line breaks are kept.
2 cells changed.
-
Drops rows where every cell is blank or only whitespace.
1 empty row removed.
-
Drops columns with no value in any row, even if they have a name.
Removed 1 empty column: Notes.
-
Fills empty cells with a value of your choice, or with the value from the row above.
Switched off. Turn it on to apply it.
-
Keeps the first of each set of identical rows. Pick columns to compare only those, such as an email address.
1 duplicate row removed; the first of each was kept.
-
Rewrites dates as YYYY-MM-DD. Asks when a column could be day-first or month-first rather than guessing.
6 dates rewritten in Signed up. Signed up read as day-first, because a date such as 14/02/2024 only makes sense that way.
-
Removes currency signs and thousands separators and turns decimal commas into points, so 1.234,50 € becomes 1234.50.
7 numbers rewritten in Amount.
-
lower case, UPPER CASE, Title Case or Sentence case, for the columns you pick.
Switched off. Turn it on to apply it.
-
Plain text or a regular expression, in every column or only the ones you pick.
Switched off. Turn it on to apply it.
-
Splits one column into several on a delimiter, such as "Last, First" into two columns.
Switched off. Turn it on to apply it.
-
Joins several columns into one with a separator, skipping blank parts.
Switched off. Turn it on to apply it.
-
Give columns new names, change their order, or leave some out of the download.
Tick to keep, type to rename, arrows to reorderSwitched off. Turn it on to apply it.
| Row | Name | Signed up | Country | Plan | Amount | |
|---|---|---|---|---|---|---|
| 1 | Ana Souza | ana.souza@example.com | 2024-02-03 | Brazil | Pro | 1200.00 |
| 2 | Ben Carter | ben.carter@example.com | 2024-02-14 | UK | Basic | 49.50 |
| 3 | Chloe Martin | chloe.martin@example.com | 2024-02-21 | France | Pro | 1200.00 |
| 4 | Deepa Rao | deepa.rao@example.com | 2024-03-05 | India | Team | 3450.00 |
| 5 | Erik Larsen | erik.larsen@example.com | 2024-03-05 | Norway | Basic | 49.50 |
| 6 | Fatima Idris | fatima.idris@example.com | 2024-03-09 | Nigeria | Pro | 1200.00 |
| 7 | Gabriel Roy | gabriel.roy@example.com | 2024-03-12 | Canada | Team | -120.00 |
Passes the first 5,000 cleaned rows to the tool through this tab's session storage, which is deleted as soon as the tool reads it.
Methods last reviewed 30 September 2026.
How to use it
-
Paste your data into the box or open a
.csv,.tsvor.txtfile. Cells copied from Excel, Google Sheets or Numbers paste as tab-separated text and are detected automatically. Large files are cleaned in full; the box then shows only their first lines. - Look at the preview. Changed cells are highlighted, and hovering over one shows its old value. Each step shows how many cells, rows or columns it changed. Tick "Changed rows only" to review just those.
- Switch steps on or off, open a step to adjust it, and move steps earlier or later: they run from the top. Add a second find-and-replace, or any other step, with the control under the list.
- If a yellow question appears, answer it: the tool will not guess whether a date is day-first or whether 1,234 is one thousand.
- Download the result, copy it, or open it in one of the chart tools.
What each step does, and where it stops being reliable
| Step | Rule | Limits |
|---|---|---|
| Trim whitespace | Removes leading and trailing spaces, tabs, line breaks and zero-width characters, in cells and column names. | Leaves spaces that are meant to be there, inside the text. |
| Collapse internal spaces | Any run of spaces, tabs or non-breaking spaces becomes one space. | Line breaks inside a cell are kept; fixed-width text loses its alignment. |
| Empty rows and columns | A row or column is empty when every cell is blank or whitespace. | A cell holding "N/A" is not blank; use Fill blanks with the null option first. |
| Duplicate rows | Exact match on all columns, or on the ones you tick; the first copy is kept. | No fuzzy matching: "Jon Smith" and "John Smith" are different rows. |
| Dates to ISO 8601 | Day and month order is decided per column from dates that can only be read one way. | Asks when a column never settles it. Two-digit years 69–99 are read as 19xx, 00–68 as 20xx. |
| Normalise numbers | Currency signs and codes, spaces and grouping separators removed; the decimal mark becomes a point. | Percentages keep their % sign. Leading zeros are kept, so IDs and postcodes survive. |
| Change case | Title Case capitalises the first letter after a space, hyphen, slash or bracket. | Names such as McDonald or van der Berg need a find-and-replace afterwards. |
| Find and replace | Plain text, or JavaScript regular expressions with $1 for groups. | A regular expression that never ends on very long cells will make the step slow. |
| Split and merge | Split makes up to 20 columns; extra parts stay in the last one. Merge skips blank parts. | Split does not respect quotes inside a cell. |
How dates are read
The step recognises ISO dates (2024-03-04, with or without a time), numeric dates with
slashes, dashes or dots (04/03/2024, 4-3-24, 21.03.2024), and
dates with a month name (19 Feb 2024, Feb 19, 2024). Every date is checked
against the real calendar, so 2024-13-45 and 29/02/2023 are reported as
unreadable instead of rolling over into another month. Times are kept, as T09:15.
The order of day and month cannot be read from one cell like 03/04/2024. It can often
be read from the column: one 15/04/2024 proves the column is day-first. The rule is
applied to each column separately, because a file joined from two systems can have an American
order date next to a European invoice date. When a column has evidence both ways, the step converts
each date that can only be read one way, leaves the rest, and tells you the column needs checking by
hand. When there is no evidence at all, it asks.
How numbers are read
A cell is treated as a number when, after removing a currency sign or code ($,
€, £, USD and others) and a minus sign or accounting
brackets, only digits and separators are left, grouped in threes. (1,200.00) becomes
-1200.00, 1.234,50 € becomes 1234.50, and a Swiss
1'234 becomes 1234. Digits are rewritten as text, never converted through
floating point, so no precision is lost and 0.10 stays 0.10. Cells that are
not numbers, such as phone numbers and dates, are left alone.
Opening the cleaned file in a spreadsheet
Spreadsheets reinterpret a CSV as they open it. Excel reads dates using your computer's regional setting and drops leading zeros from anything that looks like a number. Import the file with Data › From Text/CSV instead of double-clicking it, and set ID, postcode and phone columns to Text. Choose semicolons as the delimiter if your Excel uses a comma as its decimal mark, and add a byte-order mark if names with accents come out garbled.
Where this tool stops being the right one
It cleans one table at a time. It does not join two files, match names that are spelt differently, check that email addresses or phone numbers are real, or remember a set of steps for next month's export. For repeated jobs, or files of hundreds of megabytes, a script in Python with pandas, or OpenRefine, which has clustering for near-duplicates, will serve you better. To see what is in the cleaned data, try the summary statistics or pivot table tools; to present it, the bar and line chart maker or the Markdown and HTML table converter.
Common questions
Is my CSV uploaded anywhere?
No. The file is read by your browser and cleaned by JavaScript running in a background thread of this tab. Nothing is sent to a server, there is no account, and the data is gone when you close the tab. You can check in your browser developer tools: the network tab shows no request while you use the tool.
How does it tell whether 03/04/2024 is 3 April or March 4?
It looks at the whole column, not one cell. If any date in the column has a first number above 12, such as 15/04/2024, the column must be day-first, and every ambiguous date in it is read that way; a second number above 12 makes it month-first. If nothing in the column settles it, the tool leaves those dates untouched and asks you, rather than guessing. Dates written with dots, such as 21.03.2024, are always read day-first.
What counts as a duplicate row?
By default, a row whose every cell is exactly the same as an earlier row. The first copy is kept and later ones are removed. Tick columns under "Compare on" to treat rows as duplicates when only those columns match, for example the same email address, and tick "Ignore letter case and surrounding spaces" to match Ann@Example.com with ann@example.com. Run the trim step first (it runs first by default) so stray spaces do not hide duplicates.
How are European numbers like 1.234,50 handled?
The number step reads each column as a whole. A value that only makes sense with a decimal comma, such as 3,5 or 1.234,50, marks the column as comma-decimal; one like 1,234.50 marks it as point-decimal. Values such as 1,234 that could be either are left alone and the tool asks which you mean. Currency signs and codes, spaces and thousands separators are removed, and the result always uses a point: 1234.50.
How large a file can it clean?
It was tested with 50,000 rows and 6 columns, which cleans in well under a second on a laptop. The work happens in a Web Worker, so the page stays responsive, and the preview shows 100 rows at a time. The practical limit is your browser memory; files of a few hundred megabytes are better handled with a script.
Excel changes my dates or drops leading zeros when I open the cleaned file. Why?
Excel converts anything that looks like a date or a number as it opens a CSV, using your computer regional settings, so 00123 becomes 123 and ISO dates may be shown in your local format. The cleaned file itself is correct. To keep values exactly, use Data > From Text/CSV in Excel and set those columns to Text, and tick "Add a byte-order mark" in the download options so accented characters open correctly.
Can I undo a step?
Yes. Your original data is never changed: every time you edit a setting, the tool starts again from your input and applies the steps that are switched on, in order. Switch a step off and its effect disappears. Hover over a highlighted cell to see what it was before.
Other tools
- CSV to bar or line chart How do I turn this spreadsheet into a chart quickly?
- Pie and donut chart maker What share of the total is each category?
- Histogram maker How many bins should my histogram have?
- Scatter plot with linear regression Are these two numbers related, and how strongly?
- Summary statistics calculator What are the mean, median and outliers of this data?
- Pivot table and group-by summarizer What are total sales by region and product?
- CSV to Markdown and HTML table converter How do I put this spreadsheet in a README or web page?
- JSON to CSV converter (and back) How do I open this JSON export in a spreadsheet?