How to use the CSV Cleaner
- Paste CSV or upload a file.
- Tick the cleaning steps you want.
- Check the summary of what changed, then download the clean CSV.
Cleaning steps
Trim spaces removes leading and trailing whitespace in every cell. Remove empty rows drops rows where every cell is blank. Remove empty columns drops columns with no values. Remove duplicate rows keeps the first copy of identical rows. Tidy headers trims header names and fills blank ones.
Why clean before analysing?
A trailing space turns "London" and "London " into two categories; a blank row breaks a chart; a duplicated row inflates a count. Cleaning first avoids these errors in Excel pivots, Python, R and charts.
Worked example: a messy sales export
This export has title lines, semicolons, decimal commas with a currency sign, an NA and a duplicated row:
| Before | After cleaning |
|---|---|
Sales export 2026 | Region,Revenue (€),Units |
Report: skipped 2 title lines · removed 1 empty column · moved "€" into the column name · cleaned 4 numbers · 2 NA markers set to blank · removed 1 duplicate row.
What to clean and what to leave alone
Cleaning should remove noise, not information. Trimming spaces, deleting completely empty rows and removing exact duplicate rows are safe. Be more careful with duplicates in measurement data: two rows with the same reading may be two real measurements, not a mistake, and deleting them changes your sample size and your average. If a unique ID or timestamp column exists, a duplicate there is a much stronger sign of a repeated record.
Numbers that are really text
The most damaging problem in a file is a number stored as text: “1,200.50”, “$40”, “12 %”, “(300)” or “5 mg”. Charts and sums skip such cells or fail. Standardising them to plain numbers, with the unit moved to the column header, makes the column usable. Do this only for columns that are meant to be numeric, and check the summary of what was changed. Identifiers such as phone numbers and ZIP codes must stay as text. The cleaning guide covers delimiters, decimal commas, encodings and missing-value codes in detail.
A safe cleaning workflow
Keep the original file untouched and work on a copy. Run the cleaning steps, read the list of changes, spot-check several rows against the original, and compare the row count before and after so you know exactly how many rows were removed and why. If something looks wrong, undo by returning to the original rather than trying to repair the output. Write down the steps in your methods notes, so another person can repeat the cleaning and obtain the same result.
Frequently asked questions
- Can I clean a CSV without changing number formats?
- Yes. Untick "Fix numbers". The other steps only touch spaces, blank rows and columns, headers and exact duplicates.
- Does it change my numbers?
- Only if "Fix numbers" is ticked. Then values like 1.234,5 · $1,200 · 12 % · 5 mg · (300) become plain numbers (1234.5, 1200, 12, 5, -300), a shared unit moves into the column name, and NA / N/A / - become blank. Untick it to keep values exactly as written.
- What messy formats does it handle?
- Comma, semicolon, tab, pipe and space separated files; title or comment lines above the header; files without a header row; trailing delimiters; Markdown tables; duplicate column names; decimal commas and thousands separators.
- Are duplicates compared after trimming?
- Yes, when Trim spaces is on, so "Ben " and "Ben" count as the same.
- Is my file uploaded?
- No. Cleaning runs in your browser.
Last updated: · by the Plotiq Editorial Team · Read our guides