Tidy the text and structure of any CSV

Some problems have nothing to do with what the file is about. Whether it holds products, survey answers or sensor readings, a CSV can be saved in the wrong encoding, padded with invisible spaces, broken up by empty rows, or given headers that no script can address. These faults are why a lookup returns #N/A, why a database load stops halfway, or why a column that looks complete has gaps.

The tools here fix the container rather than the content, so they are the usual first step before any of the more specific cleanups on this site.

The order that works

  1. 1

    Repair the encoding first: every later step compares text, and garbled characters make equal values look different.

  2. 2

    Strip hidden spaces, HTML tags and empty rows and columns, so what you see in each cell is what is really there.

  3. 3

    Rename the headers if the file is going into code or a database, and leave them alone if an import template expects the originals.

  4. 4

    Flag rows with blanks in the columns that must be filled, and fix them before the file moves on.

Text inside the cells

Characters and markup that make values display or compare wrongly.

Rows, columns and headers

The shape of the file: what counts as a row, a column and a name for it.

Guides for file problems

Explanations of the symptoms these tools fix, with the manual fix in Excel or Google Sheets.