CSV Cleaner

Trim whitespace, remove blank rows and columns, dedupe records, and replace text before import.

What CSV Cleaner helps you do

Messy exports waste time on import. This cleaner removes the usual problems — stray spaces, blank rows, empty columns, duplicate records, and inconsistent labels — and gives you a preview before you download. It is the pass before a CRM, marketplace or database import that rejects imperfect rows.

Cleaning, preview, and export run entirely in your browser. Files and pasted rows are not uploaded to Haivix.

How it works

The file is parsed into a header row and data rows. Each enabled cleaning step transforms the table in memory: trimming values, dropping empty rows and columns, comparing whole rows for duplicates, and applying a literal or regular-expression replacement. The preview and statistics are rendered from the cleaned table, which is then serialized as CSV.

How to use CSV Cleaner

  1. Load a CSV or TSV file, or paste the data, and confirm the delimiter and header row.
  2. Set the cleaning options, add an optional find and replace, then select Apply cleaning.
  3. Review the preview and the removed-row and duplicate counts.
  4. Download the cleaned CSV and keep the original for comparison.

When to use it

  • Prepare a CRM, email, or marketplace import that rejects blank or duplicate rows.
  • Standardize labels or email domains before loading a spreadsheet into a database.
  • Remove empty columns and trim stray spaces after copying data between systems.
  • Normalize inconsistent capitalization before a lookup.
  • Strip repeated headers that were pasted into the middle of a file.
  • Clean a survey export before sharing it with a colleague.

When not to use it

  • Do not use it for fuzzy matching or near-duplicate detection; duplicates are whole-row comparisons.
  • Do not remove an empty column if the blank values are meaningful.
  • Do not run a broad regular expression without previewing the result first.

Example

A 9,000-row email export has trailing spaces, three duplicate sign-ups and a column that is empty except for its header. Trimming, deduplicating and removing the empty column reduces the file to 8,940 rows, and the preview confirms that the first occurrence of each email was kept.

What you can do with CSV Cleaner

  • Trim whitespace from cells.
  • Remove blank rows and empty columns.
  • Deduplicate whole rows after optional trimming and case folding.
  • Find and replace across all columns or one target column.
  • Use regular expressions and capture groups in replacements.
  • Preview the result and statistics before downloading.

Example: prepare a CRM import

Load the export and confirm the delimiter and header row. A wrong delimiter makes every cleaning option work on the wrong columns.

Trim whitespace first, then remove blank rows and empty columns. Deduplication works best after the trim because a trailing space otherwise makes two rows look different.

Apply any label replacement, review the statistics, and download the cleaned CSV. Keep the original export until the import succeeds.

What to know before you start

  • Duplicate detection compares whole rows after optional trimming and case folding; it does not do fuzzy matching.
  • Empty-column removal drops a column when every data cell is blank, even if the header has a name.
  • Find and replace runs in memory; review the preview before downloading the cleaned file.
  • The first occurrence of a duplicate is kept; the tool does not merge values from duplicate rows.
  • Very large files are limited by browser memory.

Common mistakes

  • Deduplicating before trimming, so rows that differ only by a space remain.
  • Using a regular expression that also matches the header row.
  • Removing an empty column that was reserved for a later import step.
  • Replacing text across all columns when only one column needed the change.
  • Overwriting the original export before the import is verified.

Troubleshooting

If duplicates remain, check case folding and trimming; a difference in case or spacing is enough to keep both rows.

If a replacement removed too much, undo by reloading the original and narrowing the target column or the pattern.

If the wrong column is empty, the delimiter may be wrong, making every row look sparse.

If the file will not parse, check for inconsistent quoting or a missing header row.

If the result looks correct but the import still fails, check the destination's encoding and column requirements.

If a replacement changed a value you wanted to keep, reload the original and narrow the target column or the pattern before applying it again. Regular expressions are powerful enough to remove more than intended in one pass.

If the statistics show fewer removed rows than expected, the duplicate check may be case-sensitive because case folding is off. Enable it only when two values with different case really are the same record.

Related standards and documentation

  • RFC 4180 describes the CSV format and quoting rules.
  • Regular-expression syntax follows the JavaScript engine used by the browser.
Trim, dedupe, preview
  • Trim before deduplicating.
  • Duplicates are whole-row matches.
  • Preview every replacement.

Frequently Asked Questions