CSV Cleaner
Clean CSV files: trim spaces, remove empty and duplicate rows, tidy column names, filter, sort and drop columns. See exactly what changed.
Processed locally in your browser. Your files are not uploaded.
What this tool does
Messy exports are the norm: stray spaces, blank rows, repeated records, inconsistent column names and columns you never wanted. Load a CSV file or paste the text and apply only the clean-up steps you need. The preview updates as you change options and a report shows rows and columns before and after, how many cells were trimmed, how many rows were empty, filtered out or duplicates.
Duplicate removal can compare entire rows or only the columns you choose as a key (for example e-mail or customer ID), keeping the first match. Normalize column names to trimmed, lowercase or snake_case; duplicate and empty names are made unique automatically. Filter rows with one or more conditions that must all match (contains, equals, not equals, starts with, greater than, less than), sort by any column as text or as numbers, and untick the columns you want to drop.
Export with the delimiter of your choice (comma, semicolon, tab or pipe), optionally with a UTF-8 BOM for Excel, and with CSV-injection protection that prefixes cells beginning with =, +, - or @. Files over 1 MB are processed in a background worker with a progress bar. The data stays on your device throughout.
How to use it
- 1Drop a CSV file or paste CSV text. The delimiter is detected automatically, or choose it under Export.
- 2Switch on the clean-up steps: trim, remove empty rows, remove duplicates (optionally by key columns), normalize names.
- 3Add filters, pick a sort column and untick any columns to remove.
- 4Review the report and preview, choose the output delimiter and options, then Copy or Download the cleaned CSV.
Supported formats
Input: .csv, .tsv or .txt files and pasted text in UTF-8, with a header row. Output: .csv with a delimiter of your choice.
Privacy
This tool runs in your browser. The data you provide is processed on your device and is not sent to our servers.
Limitations
- The first row is always treated as the header.
- The whole file is held in memory; very large files may be slow on small devices, and the size limit is shown in the drop area.
- Only UTF-8 text is supported; other encodings should be converted first.
- Rows are processed in a fixed order: trim, remove empty, filter, remove duplicates, sort, drop columns, rename. Filters, keys and sort refer to the original column positions.
- Numeric sorting and comparisons understand plain numbers and thousands separators, not currencies or dates. Non-numeric values go last when sorting numerically.
- Cells are never type-converted; values are written back as the text they were read, apart from the changes you request.
FAQ
Can I remove duplicates based on one column?
Yes. Switch on duplicate removal and tick the key columns, for example email. The first row for each key is kept. With no key ticked, entire rows are compared.
What does normalizing column names do?
Trim collapses extra spaces, lowercase also lowercases, and snake_case converts 'First Name' or 'firstName' into first_name. Names that become identical get _2, _3 suffixes, and empty names become column_N.
How do filters combine?
All filters must match (AND). Text comparisons ignore case unless you turn on case-sensitive matching. Greater/less than compare numbers when both sides are numeric, otherwise text.
What is the CSV injection option?
Spreadsheets treat cells starting with =, +, - or @ as formulas, which can be abused. With the option on, those cells get a leading apostrophe. Plain negative numbers are left untouched.
Does it change my original file?
No. Your file is read in the browser and a new cleaned CSV is produced for download.
Related tools
CSV to JSON Converter
Convert CSV or TSV to JSON in your browser. Auto-detects the delimiter, handles quotes and BOM, and previews the first rows.
JSON to CSV Converter
Convert a JSON array of objects or arrays to CSV. Flattens nested objects with dot notation, with custom delimiter and spreadsheet-safe export.
Remove Duplicate Lines
Delete duplicate lines from a list, keep the first or last occurrence, ignore case, trim spaces and sort. See how many were removed.
Markdown to HTML
Convert Markdown (GitHub-flavoured) to clean HTML with a live preview. Copy or download the result, entirely in your browser.