Documents and Office

How to Clean Messy Data: Spaces, Duplicates, Dates and Numbers

A practical guide to cleaning CSV data: trim spaces, remove duplicates, standardise case, convert dates to ISO 8601 and normalise numbers before analysis.

Saizul Amin
Saizul Amin30 Oct 2026 · 3 min read
How to Clean Messy Data: Spaces, Duplicates, Dates and Numbers

How to Clean Messy Data: Spaces, Duplicates, Dates and Numbers

Data scientists often say they spend most of their time cleaning data, and anyone who has worked with exported spreadsheets knows why. The same problems appear again and again: stray spaces, inconsistent capitals, three date formats in one column, numbers stored as text with currency signs, and duplicate rows. The free CSV Data Cleaner fixes these in one pass and keeps a log of every change.

Spaces and invisible characters

"North" and "North " look the same but do not match in lookups, filters or pivot tables. Text copied from web pages adds non-breaking spaces and zero-width characters that are invisible but just as disruptive. Trimming spaces from both ends, collapsing runs of spaces into one and removing invisible characters is the first step for almost any dataset.

Consistent case

Category labels typed by different people end up as North, north and NORTH. For grouping, they should be one value. Title Case suits names, places and categories, but it can damage acronyms (BBC becomes Bbc) and brand names, so apply case changes only to the columns that need them. Email addresses are best lower-cased, since mail systems treat them case-insensitively.

Dates in ISO 8601

Dates are the most error-prone column in most files. 06/01/2026 is 6 January in the UK and June 1 in the United States, and spreadsheets silently guess. The international standard ISO 8601 writes dates as YYYY-MM-DD, which is unambiguous, sorts correctly as text and is understood by every database.

The cleaner converts ISO dates, slashed or dotted dates and written dates such as "29 Oct 2026" into ISO form. For ambiguous numeric dates, you choose whether the first number is the day or the month. Dates where one number is larger than 12 are read correctly either way. Spot-check a few rows against the source after converting.

Numbers that are really numbers

Numbers with thousands separators, currency symbols, brackets for negatives or percent signs are often stored as text. Normalising them to plain numbers lets spreadsheets and databases calculate with them. Choose the decimal convention of your data: 1,234.56 in the UK and US, 1.234,56 in much of Europe.

Yes, no, true, false

Boolean columns arrive as Yes, Y, TRUE, 1 and more. Standardising them to true and false makes counting and filtering reliable.

Duplicates

Exact duplicate rows usually come from repeated exports and can be removed safely. Duplicates by key, such as two rows with the same email address but different name spellings, need a choice about which version to keep. The cleaner keeps the first occurrence, so sort your data first if, for example, the most recent record should win.

Keep the original

Never clean data in place without a copy. The cleaner always writes a new file, and the change log shows how many cells each step changed, with before-and-after examples you can check. Note the steps you used so the same cleaning can be repeated on next month's export.

Cleaning is not correcting

Cleaning makes data consistent; it does not make it correct. A cleaned row can still hold a wrong price or a misspelt name. Keep notes of what you changed, check suspicious values with the people who produced the data, and fix recurring problems at the source, for example with drop-down lists and validation on the form that collects the data.

Step by step

  1. Paste a CSV or open a file.
  2. Choose the cleaning steps.
  3. Set the date order and decimal mark for your data.
  4. Limit case changes to the right columns.
  5. Review the change log and preview, then download the cleaned CSV.

Privacy

Cleaning runs in your browser; the file is never uploaded.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages