CSV Cleaner
Clean up messy CSV data
Free, no signup. Runs entirely in your browser — files stay on this device.
Drop your file here or browse from your device
Accepts CSV, TSV, TXT. Maximum input: 10 MiB. Files above this hard limit are rejected before local processing.
CSV Cleaner at a glance
| Safe defaults on | Trim leading/trailing whitespace, drop empty rows, normalize mixed line endings (CRLF/CR → LF), strip invisible chars (UTF-8 BOM, zero-width spaces), normalize smart quotes |
|---|---|
| Opt-in switches | Deduplicate exact rows, drop empty columns, standardize null-like placeholders (N/A, NULL, none), strip leading zeros (off by default to protect ZIP/SKU codes) |
| Transparency | Live before/after preview and summary report showing exact cells cleaned and rows removed before download |
| Input formats | CSV, TSV, and TXT with automatic delimiter detection |
| Privacy | Cleaned locally in your browser — files never leave your device |
Clean up a messy CSV in your browser. Pick the cleaning steps you want, see what changes, and download the tidied file. Each step is a separate switch, so you never get transformations you did not ask for.
The defaults handle what breaks imports most often: stray leading and trailing spaces, blank rows padding the end of a file, inconsistent line endings from mixed Windows and Unix tooling, smart quotes pasted in from a word processor, and invisible characters such as zero-width spaces and a leftover byte order mark. Any of those can make an otherwise valid value fail a lookup or a validation rule.
The riskier operations are off by default and stay that way until you enable them. Stripping leading zeros will destroy ZIP codes and product codes, and dropping empty columns changes your schema — both are useful when you mean them, and damaging when they happen silently.
How to Use the CSV Cleaner
- Upload your CSV file or paste CSV data
- Enable the cleaning steps you want and leave the rest off
- Review the cleaned preview
- Download the cleaned CSV
Why Valid-Looking CSV Files Still Fail Imports
Some of the hardest CSV import errors leave no visual clue in a spreadsheet. A database, CRM, or accounting uploader rejects a column or fails to match a key even though the cells look identical on screen. Almost every time, one of five invisible artifacts is responsible:
- UTF-8 BOM attached to the first header (U+FEFF): Excel and Windows tools prepend a 3-byte Byte Order Mark at the start of UTF-8 files. Parsers that do not strip it read the first column as "\uFEFFemail" instead of "email", causing required-column checks to fail.
- Trailing spaces and non-breaking spaces (U+00A0): Text copied from web pages, PDFs, or CRMs often carries trailing regular spaces, zero-width spaces (U+200B), or non-breaking spaces. Two values that both read "Active" fail exact-match joins and deduplication.
- Smart quotes pasted from documents: Word processors replace straight ASCII quotes (") with curly quotes (“ ”). Because RFC 4180 only recognizes straight double quotes as field wrappers, curly quotes leave stray characters inside cell values.
- Mixed Windows (CRLF) and Unix (LF) line endings: Files edited across macOS, Windows, and Linux scripts often mix and line endings, leaving hidden carriage returns ( ) at the end of the final column in strict Unix ingestion pipelines.
- Inconsistent empty placeholders (N/A, NULL, none): Mixed spreadsheets store missing values as N/A in one row, NULL in another, and blank in a third. Standardizing null-like tokens to empty cells ensures numeric and date columns validate cleanly.
Worked Example: Cleaning a Messy CRM Export Safely
The snippet below shows a typical messy export: a stray UTF-8 BOM before the first header, padded whitespace, curly quotes, a trailing blank row, and an N/A placeholder — alongside a Boston ZIP code (02115) that must keep its leading zero.
With the default switches plus Standardize nulls enabled (and Remove leading zeros kept OFF), every invisible defect is removed while 02115 remains intact:
// Before (contains BOM, trailing spaces, smart quotes, blank row, N/A)
\uFEFFemail , name , postal_code , company
alice@example.com , “Alice Chen” , 02115 , N/A
,,,
bob@example.com , Bob Diaz , 07030 , Acme Co.
// After (trimmed, BOM & blank row removed, quotes & nulls normalized)
email,name,postal_code,company
alice@example.com,"Alice Chen",02115,
bob@example.com,Bob Diaz,07030,Acme Co.Features
- Trim leading and trailing whitespace from every cell
- Remove empty rows, and optionally empty columns
- Strip invisible characters including zero-width spaces and the BOM
- Normalise smart quotes to straight quotes
- Standardise mixed line endings across the file
- Optionally standardise null-like values such as N/A and NULL
- Optionally strip leading zeros — off by default, since it destroys ZIP codes
- Every step is individually switchable, and nothing runs unless you enable it
Use Cases
- Fix an export that fails an import validation for no visible reason
- Strip trailing spaces that break lookups and joins
- Remove blank rows and columns left behind by a spreadsheet
- Clean text pasted from a word processor or a PDF
- Normalise a file before merging or comparing it with another
- Prepare a messy dataset for analysis
Frequently Asked Questions
What does the CSV cleaner actually change?
Only the steps you enable. Each cleaning operation is a separate switch — whitespace trimming, empty row removal, invisible character stripping, quote normalisation, line-ending standardisation, and a few more — so nothing is transformed behind your back.
Why does my CSV fail to import when it looks fine?
Usually something invisible. A trailing space, a zero-width character, a byte order mark at the start of the first header, or a smart quote pasted from a document all look identical to clean data on screen and all break exact-match validation.
What is a BOM and why does it matter?
A byte order mark is an invisible character some tools write at the start of a file. It attaches itself to your first column name, so a header that reads id fails to match id. Stripping it fixes the mismatch.
Will cleaning damage my ZIP codes or product codes?
Not unless you ask it to. Stripping leading zeros is off by default precisely because it turns 01234 into 1234 and ruins postal codes, phone numbers, and padded identifiers.
What does removing empty columns do?
It drops columns that contain no values in any row. Useful for exports padded with unused fields, but it changes the shape of your file, so it is off by default.
What are null-like values?
Text placeholders such as N/A, NA, NULL, and none that stand in for missing data. Standardising them makes empty values consistent so downstream tools treat them the same way.
Is my file uploaded anywhere?
No. Cleaning happens in your browser and the file contents are not sent to the app server.