mygems

Clean up a messy CSV

Germany, germany and “Germany ” become one value again.

  • Profiles every column
  • Trims and fixes spacing
  • Merges spelling variants
  • Nothing uploaded

1.Open the file

CSV or TSV. Drag it here, or choose a file.

Why it exists

Most data that "does not add up" is not wrong, it is untidy: a trailing space that makes two identical names group separately, an N/A typed into a number column, the same country written three ways by three people. None of it is visible in a spreadsheet, which is why it survives. This counts every one of those problems in every column first, shows you examples, and only then fixes the ones you choose.

What it does

  • Profiles each column across every row: what it holds, how much is empty, how many distinct values, and what is wrong with it.
  • Trims spaces from the ends of values and collapses doubled spaces, tabs and non-breaking spaces.
  • Empties out placeholders such as N/A, null, none and -, so they stop counting as values.
  • Changes letter case per column, and merges values that differ only by case or spacing into their most common spelling.
  • Removes completely empty rows, counts every cell it changed, and writes the result as UTF-8.

What it leaves alone

It does not rewrite dates or numbers written in a local format, such as 03/04/2025 or 1.234,5, because there is no way to tell from the file alone which convention it uses, and guessing wrong would quietly corrupt the column. It also never changes line breaks inside a value, since those are content.

Questions

How does it find values that are spelled differently?
It compares values with case and spacing ignored. When two or more spellings collapse to the same thing, such as Germany, germany and Germany with a trailing space, the column is flagged and examples are shown. Ticking the fix rewrites all of them to whichever spelling is most common.
Will it change my numbers?
Only by removing spaces around them, which is what stops a column of numbers from being read as numbers. It does not reformat, round or convert a value.
My file shows strange characters. Can this fix it?
Often, yes. A file that is not valid UTF-8 is read as Latin-1 (Windows-1252), the usual encoding of older Excel exports, and the cleaned file is always written as UTF-8.