Spreadsheet exports from CRMs, bank statements, and web scrapers almost always arrive with blank rows, trailing spaces that break VLOOKUP and database imports, duplicate email entries, or mismatched semicolon delimiters. This browser-based CSV cleaner parses your tabular data locally, removes empty rows and duplicate records, trims invisible leading/trailing whitespace across every cell, lets you filter or reorder columns, and exports pristine RFC 4180 CSV or structured JSON with zero server uploads.
Where messy CSV files cause database and spreadsheet headaches
Importing a raw .csv file straight into PostgreSQL, Airtable, Notion, HubSpot, or a billing script often fails on row 4,182 because of invisible formatting quirks:
- Invisible trailing spaces (
"[email protected] "): A single trailing space at the end of an email address or SKU causes SQL joins, uniqueness checks, and ExcelXLOOKUPformulas to fail silently. - Duplicate customer leads or transaction rows: Merging three regional mailing lists and needing to deduplicate rows either across the entire row or by a specific key column (like
emailoruser_id). - Blank spacer rows and broken line endings (
CRLFvsLF): Accounting software exports that insert empty summary lines every 50 rows, causing automated CSV parsers to crash withnullcolumn errors. - Semicolon (
;) or Tab (\t) delimiter mismatches: Opening a European Excel CSV export (which uses semicolons;as the field separator because commas are used for decimals) in a US system that expects standard commas,. - Converting CSV tables to JSON arrays: Turning a cleaned spreadsheet into a ready-to-import
.jsonarray of objects for a frontend app or API seed script.
Cleaning and transforming a CSV file step by step
- Load your CSV or TSV data: Drag a
.csv,.tsv, or.txtfile into the dropzone, or paste raw comma/tab-separated text directly into the input box. - Verify delimiter and header row: Let the parser auto-detect commas (
,), semicolons (;), tabs (\t), or pipes (|), and confirm whether Row 1 contains column headers. - Apply one-click cleaning rules: Toggle Trim Cell Whitespace, Remove Empty Rows, Remove Duplicate Rows (full row or by specific column), and Remove Empty Columns.
- Inspect the interactive data table: Preview the before-and-after row counts, sort or filter rows, or rename/drop unneeded columns right in the grid.
- Export Clean CSV or JSON: Click Download CSV for a standardized comma-separated file or Export as JSON to download an array of keyed JSON objects.
Built-in data hygiene features
RFC 4180 quote-aware parsing
Naive scripts that split CSV lines with line.split(",") break immediately whenever a cell contains a quoted address like "142 MG Road, Suite 4B, Bengaluru" or an embedded newline inside quotes. Our state-machine parser respects double-quoted fields and escaped quotes ("") so commas inside addresses and product descriptions never shift your columns out of alignment.
Smart deduplication with live removed-row counter
You can deduplicate exact full-row matches or deduplicate by a specific primary key column (such as keeping the first occurrence of each unique Email address in a lead list) while seeing the exact count of removed duplicates (e.g., 1,240 rows → 1,085 unique rows).
Cell whitespace trimming and case normalization
Enabling Trim Whitespace strips leading and trailing spaces (\s+) and non-breaking spaces (\u00A0) from every single cell in the dataset in milliseconds, while optional case helpers normalize headers (snake_case, lowercase) or email columns.
A real example: cleaning a 1,500-row event registration export for CRM import
Suppose you export registrations from three webinar landing pages into webinar_leads_raw.csv (1,500 rows, 6 columns: Full Name, Email, Company, Role, Country, Notes).
- Drop
webinar_leads_raw.csvinto the CSV Cleaner. - Enable Remove Empty Rows:
42blank separator rows at the bottom of each merged sheet are removed (1,458 rowsremaining). - Enable Trim Whitespace:
319cells that had trailing spaces after email addresses or company names are trimmed cleanly. - Enable Remove Duplicates (keyed on the
Emailcolumn, case-insensitive):168attendees who registered twice are consolidated (1,290 unique leadsremaining). - Drop the empty
Notescolumn and click Download Clean CSV (or Export JSON). Your file imports into HubSpot or PostgreSQL on the first try with zero validation errors.
Practical tips and limitations
- Multi-sheet
.xlsxExcel workbooks:.csvis a plain-text single-sheet format. If you have a multi-tab.xlsxworkbook in Excel or Google Sheets, export the active sheet as.csv(File → Download → Comma-separated values) before loading it here. - Leading zeros in ZIP codes and phone numbers (
01234): The CSV Cleaner preserves leading zeros ("01234") accurately in the exported text file. However, if you double-click the exported.csvin Microsoft Excel, Excel's default auto-formatting will strip leading zeros unless you import the column as Text via Excel'sData → From Text/CSVwizard.
Privacy and local browser execution
CSV spreadsheets regularly contain customer names, email lists, phone numbers, payroll figures, and bank transactions. This tool runs 100% locally in your browser's memory with zero fetch, XMLHttpRequest, or WebSocket calls. Your tabular data never leaves your computer.
Handling UTF-8 BOM, line-ending normalization (CRLF vs LF), and null cells
Cross-platform CSV exchanges frequently run into character encoding and line-break mismatches between Windows, macOS, and Linux:
- Line break standardization (
\r\nvs\n): Windows spreadsheet tools terminate rows with Carriage Return + Line Feed (CRLF), whereas Unix CLI scripts (awk,cut, Python pandas) often outputLF. The cleaner normalizes mixed line endings across the entire file so row counts never split mid-record. - Consistent column arity across rows: If Row 1 declares
6header columns (id,name,email,role,plan,created_at) and Row 84 only has4commas because the trailing two fields were omitted, strict SQLCOPYcommands abort the import. Padding short rows with empty string cells ("") ensures every row in the exported CSV has the exact same number of columns as the header.
Related tools
If you export your cleaned spreadsheet as JSON, you can inspect or format nested structures in the JSON Formatter & Validator. To compare two versions of a CSV file line by line, open the Diff Checker, or build custom column pattern filters in the Regex Tester. Read our full tutorial on how to use the CSV cleaner.