CSV Diff Tool

Compare two CSV files and highlight differences — added (green), removed (red), modified (yellow).

Key column:
CSV A (Original)
CSV B (Modified)

Paste CSV in both panels then click Compare

Or click to see an example

About the CSV Diff Tool

The CSV Diff Tool compares two CSV files row by row and highlights every difference between them. Added rows are shown in green, removed rows in red, and modified rows in yellow. For modified rows, the exact cells that changed are highlighted with the old value struck through and the new value shown beneath it.

When you enable the Key column option, rows are matched by a unique identifier (such as an ID or name) rather than by position. This means reordered rows are correctly identified as unchanged, and truly new or deleted rows are accurately flagged. Without a key column, rows are compared by their index position.

All CSV parsing and comparison runs entirely in your browser — no data is ever uploaded to a server. Quoted fields containing commas and escaped double-quotes are handled correctly.

How to Compare CSV Files Online

  1. Paste your original CSV into the left panel (CSV A) and the modified CSV into the right panel (CSV B).
  2. Toggle First row as headers if your CSV includes column names in the first row (recommended).
  3. Optionally enter a Key column name (e.g. id or name) to match rows by value rather than by position.
  4. Click Compare to run the diff.
  5. Review the color-coded table — green rows are new, red rows are deleted, yellow rows have cell-level changes shown with strikethrough.
  6. Check the summary badges for a quick count of added, removed, modified, and unchanged rows.
  7. Click Copy Result to copy the diff output as plain text with +, , and ~ prefix markers.

Common Use Cases for CSV Comparison

  • Database export auditing — Compare CSV exports from two database snapshots to track data changes over time.
  • ETL pipeline validation — Verify that a data transformation pipeline produced the correct output by diffing input and output CSVs.
  • Spreadsheet change tracking — Identify what changed between two versions of a shared Excel/Google Sheets export.
  • A/B test result comparison — Compare metric exports from two experiment variants to spot performance differences.
  • Configuration file diffing — Compare CSV-based configuration exports across environments (dev, staging, prod).
  • Product catalog updates — Find which products were added, removed, or had price/description changes in a supplier feed.
  • Test data validation — Compare expected vs actual CSV output in automated test pipelines.

Frequently Asked Questions

What is the difference between index-based and key-based comparison?

Index-based comparison (no key column) compares row 1 of CSV A with row 1 of CSV B, row 2 with row 2, and so on. Key-based comparison looks up each row by the value in a specified column, so rows that were reordered, inserted, or deleted are correctly identified regardless of their position in the file.

Does the tool handle quoted fields and commas inside values?

Yes. The CSV parser correctly handles RFC 4180-style quoting: fields wrapped in double quotes can contain commas, and escaped double quotes ("") inside quoted fields are handled properly.

What do the colour codes mean?

Green (+) rows exist in CSV B but not CSV A — they were added. Red (−) rows exist in CSV A but not CSV B — they were removed. Yellow (~) rows exist in both files but have at least one cell that changed — the old value is struck through and the new value appears below it. Uncoloured rows are identical.

What happens if the two CSVs have different numbers of columns?

The tool merges the column sets from both files. Missing cells are treated as empty strings. This means you can compare CSV files that had columns added or removed between versions.

Is my CSV data sent to a server?

No. All CSV parsing and comparison is performed entirely in your browser using JavaScript. Your data never leaves your device, making this tool safe for sensitive or proprietary datasets.

How many rows can this tool handle?

The tool works well for files with thousands of rows. For very large CSVs (tens of thousands of rows), performance depends on your device. All processing is synchronous in the browser, so extremely large files may cause a brief delay when clicking Compare.

Can I compare CSVs without headers?

Yes. Untick the First row as headers toggle. The tool will label each column as Col 1, Col 2, etc. and compare all rows including the first one.