Data & CSV

CSV Cleaner

CSV Cleaner

Trim spaces, remove duplicates, fix case, find and replace, split and merge columns, fill blanks. All undoable.

About this tool

About CSV Cleaner

Real-world exports are messy: names with stray spaces, the same customer twice, cities in three different capitalisations, a full name that should be two columns, and blanks where a value should be. The CSV Cleaner fixes all of that in one place, with a live preview of the table beside the controls. Trim leading, trailing and doubled spaces; remove duplicate rows using every column or only the ones that identify a record; change text to UPPER, lower, Title or Sentence case; find and replace with plain text or regular expressions; rename, delete or reorder columns; split a column on a separator; merge several columns into one; drop empty rows and columns; and fill missing values with a fixed value, the column mean, median or most common value, or the value above. Each step says exactly how many cells or rows it changed, and every step can be undone. Export the cleaned file as CSV, TSV or JSON. Everything runs in your browser. With your own AI key you can also describe a cleanup in plain words and get the matching cleaner steps to review and apply.

Built and maintained by Abhi JainUpdated

How to Clean a CSV File

  1. 1

    Open the CSV

    Drop the file on the page, paste the data, or click Try sample data to practise on a messy example.

  2. 2

    Pick a cleaning step

    Choose an operation on the left, such as Trim spaces, Remove duplicates or Split column, and set its columns and options.

  3. 3

    Apply and check

    Click Apply. The preview updates and a message says how many cells or rows changed. Click Undo to step back.

  4. 4

    Export

    Open Export and download the cleaned data as CSV, CSV for Excel, TSV or JSON.

CSV Cleaner: questions and answers

How do I remove extra spaces from a CSV file?

Choose Trim spaces, pick the columns (or leave all selected) and click Apply. Turn on Collapse inner spaces to also turn double spaces inside a value into one.

Will cleaning change my original file?

No. Your file is only read. All changes happen to a copy in the browser, and you download the cleaned version when you're happy with it.

Can I undo a cleaning step?

Yes. Every step is recorded, and Undo and Redo move back and forth through up to 40 of them. Ctrl+Z and Ctrl+Shift+Z work too.

How do I split a full name into first and last name?

Choose Split column, pick the name column, set the separator to a space and Max parts to 2, so names with a middle name keep the rest in the second column. Name the new columns and click Apply.

What counts as a missing value?

Blank cells and common placeholders: NULL, NA, N/A, NaN, None, a lone dash and #N/A. Turn on Blank cells only if those words are real values in your data.

Can AI clean my CSV from a description?

Yes. Click AI and write what you want, such as "lowercase emails and remove duplicate customers". AI turns it into this cleaner's own steps, checked against your columns; nothing changes until you click Apply, and Undo reverses it. The column names and first 30 rows are sent. It's optional and uses your own AI key (Claude, OpenAI, Gemini, DeepSeek, OpenRouter or a compatible endpoint), sent straight from your browser to that provider; KissThePDF never sees it. Without a key the tool works exactly the same.