CSV and data

How to clean CSV data before import

A CSV cleanup workflow for reviewing imported data, deduplicating rows, filtering records, and extracting the columns that matter.

CSV imports fail when headers are inconsistent, duplicate rows slip through, required columns are empty, or exported values do not match the target system.

Clean the file before import so validation errors are easier to understand and rollback is less likely.

Preview structure first

Open the CSV as a table and check delimiters, headers, row counts, empty columns, quoted values, and line breaks.

Confirm the exported file matches the target import template before editing data.

Remove duplicates and irrelevant rows

Deduplicate by whole row or by a stable key such as email, ID, SKU, slug, or external reference.

Filter rows by status, date, category, or required values so only intended records are imported.

Extract and verify important columns

Extract IDs, emails, slugs, or references for spot checks, allowlists, or comparison against another system.

Before importing, keep a copy of the original file and document every cleanup step.

CSV import cleanup checklist

  • Preview the table and confirm delimiter, headers, and row count.
  • Check required columns and empty values.
  • Remove duplicates by the right key.
  • Filter out rows that should not be imported.
  • Extract key columns for spot checks and keep the original file.

Related guides

Learn the workflow behind this tool and what to check next.

Related tools