CSV Cleaner

Clean CSV files.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Paste CSV text and press Process. Cell and header spaces are trimmed, rows with no data are removed and columns that are empty in every row are dropped.

How to use

1
Step 1
Paste the CSV text, including its header row.
2
Step 2
Press Process.
3
Step 3
Copy the cleaned CSV, or use the Data Lab button to continue working.

How it works

The first row is read as the header and the text is parsed with quote handling. Spaces around headers and cell values are trimmed. A row where every cell is blank is removed, and a column is dropped if no remaining row has a value in it. Blank cells in otherwise filled rows stay blank. Output lines end with Windows-style line breaks.

Worked example

A messy export

Input
name, city ,notes Ana , Lahore , , , Bo,Oslo,hi
Output
name,city,notes Ana,Lahore, Bo,Oslo,hi
Walkthrough
The header and cell spaces are trimmed, and the row that is empty in every cell is removed.

Limitations

  • Does not remove duplicate rows or fix data types.
  • The first row must be a header.
  • Paste text; there is no file upload.
  • Duplicate header names may be merged by the parser.

Questions

How do I remove empty rows from a CSV?
Paste it and press Process.
Does it remove duplicates?
No. It tidies the CSV but does not delete duplicate rows.
Will it change my column order?
No. Columns keep their order; only empty columns are dropped.

Features

  • Trims cells
  • Drops empty rows and columns
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • PDF, What is it FOR?

    Computerphile

    File tools often sit next to document packet workflows.

    Watch on YouTube
  • Learn JSON - Full Crash Course

    freeCodeCamp.org

    Structured file formats show up beside binary converters.

    Watch on YouTube