CSV Diff: Compare Two CSV Files Online

Original CSV
Changed CSV

Paste or upload two CSV files and see the changed rows, prices, and fields side-by-side. Runs in your browser, no signup, nothing stored unless you share.

What is the CSV diff tool?

Compare two CSV files in the browser, free: yesterday's vendor export goes on the left, today's on the right, and every changed cell is highlighted. Nothing is uploaded unless you hit Share, and there is no account or quota.

The diff itself is character-level, with a semantic post-processing pass that pulls highlights onto whole field values rather than scattering them across commas. The grammar this tool assumes is the de facto CSV spec, RFC 4180: comma-separated fields, optional double-quoting, doubled quotes to escape a literal quote, CRLF line endings.

If you have ever opened two 8,000-row vendor price lists in Excel, scrolled column by column trying to spot the SKU whose price moved, and given up, paste both files here instead: the new price is highlighted inside its row. For free-form prose or plain .txt exports, compare text files on our main page. For structured data with stable keys, JSON diff handles object reordering far better than CSV ever can. Legacy exports out of older ERPs often arrive as XML, and XML diff handles those.

What the CSV diff does, and what it does not

The comparison is line-by-line, character-aware. Insertions appear in green on the right, deletions in red on the left. The line-mode pass keeps performance reasonable on 5 MB files, then a character-mode refinement on changed lines picks out the exact field that moved. Unlike diff in a terminal, which reports the whole row, you see which cell inside it changed.

It is a text diff, not a row-key-aware compare. If you reorder rows by sorting on a different column, every line will look changed even though the underlying data is identical. If you reorder columns, the same thing happens. There is no notion of a primary key here, the way csvkit's csvjoin or a pandas merge on a SKU would give you. Sort both files the same way before pasting, or use one of those tools when you need set-based comparison.

The header row is data to this tool. Line 1 is treated like every other line, which means a header rename shows as a single-line diff at the top. That is usually what you want when reviewing schema drift. If you only care about body rows, strip the header from both sides before pasting. The CSV format itself, including header conventions, is described in the CSV background article and in RFC 7111, which defines URI fragments for selecting cell ranges within a CSV resource.

How to compare CSV files in three steps

Paste two exports and read the result. No signup, and the compare never makes a server round-trip.

  1. 1

    Paste or upload your CSV

    Paste the older CSV on the left and the newer one on the right. Or click Upload on either side to load a .csv, .tsv, or .txt file straight from disk. Sample loads a small product price list where one price moved and a row was added.

  2. 2

    Click Format if a file came from Excel

    Excel on Windows saves CSV with CRLF (\r\n) line endings and often a UTF-8 byte order mark; Python's csv.writer or a Unix pipeline usually writes plain LF. You rarely need to do anything about it: the editor reads CRLF and LF as the same line break, and Upload drops a leading BOM. If you pasted text that still starts with a BOM, click Format on that pane to remove it. The validation badge then checks that every row has as many columns as the header.

  3. 3

    Read the diff

    Removed values are shaded red on the left, added ones green on the right, and the two panes scroll together. Look for changed prices, new rows added at the bottom, and email addresses corrected mid-list. Header changes appear as a single-line diff on line 1.

When to compare CSV files this way

Reconciling a vendor inventory CSV against your last export

A supplier sends a fresh price list weekly. Drop last week's file in the left pane, this week's on the right, and SKU-level price moves jump out without you scrolling 4,000 rows in Excel hunting for which cell turned yellow. Doing this in Excel with VLOOKUP against a second sheet is doable but slow; the diff is faster when you just need a quick sanity check before pushing the new prices into your store.

Comparing a database export against a sanitised partner copy

Before sending a customer dump to a partner you redact PII: email becomes redacted@example.com, phone gets masked, full names truncated to first initial. Diff the source export against the sanitised copy and confirm that only the redacted columns changed. If a billing_address column unexpectedly shows up in the diff, your redaction script missed a field, and you catch it before the file leaves your laptop.

Auditing a product feed before pushing to a merchant catalog

Google Merchant Center, Facebook Catalog, and most marketplaces eat a CSV (or TSV) feed. After your CMS regenerates the feed, diff it against last night's known-good copy to catch a regex that stripped trailing zeros from price, an availability column that flipped from in_stock to out_of_stock on every row because of an IF() bug, or a new GTIN field your team added without telling anyone.

Diffing two Salesforce or HubSpot CSV exports

When a sales op asks "which contacts changed since last week?", export the same report twice (then and now), and diff the two files. The CSV will not be ordered by record ID by default, so sort both sides on the ID column first; otherwise every row looks reshuffled. Once sorted, real changes (a lead status moved from MQL to SQL, an email corrected after a bounce) show up clearly.

Comparing pipeline output against yesterday

A nightly ETL job writes a CSV to S3. Today's row count is suspiciously different from yesterday. Pull both files, diff them, and you find the schema drift: a new column appeared mid-table because the upstream API added a field, which shifted every downstream cell by one. The diff catches the structural change instantly, where a row count check on its own would only have told you something was off.

Reviewing an A/B test result CSV from your stats team

Your data scientist ships a CSV with the experiment results. They re-run the analysis after a methodology tweak. Diff v1 against v2: did only the test statistics columns change, or did the assignment counts shift too (which would mean the cohort definition moved)? Diffing the two outputs is the cheapest sanity check before you ship a feature based on the result.

CSV quick reference

What RFC 4180 says, set against what Excel, Google Sheets and Python write in practice.

TopicWhat this tool does
Quoting per RFC 4180 Fields containing commas, double quotes, or newlines must be wrapped in double quotes. "Widget, small" is one field. Plain values like 4.99 need no quotes. See RFC 4180.
Escaped double quotes A literal " inside a quoted field is escaped by doubling it. "He said ""hi""" is the value He said "hi". Backslash escaping is not standard CSV, even though some tools accept it.
Embedded newlines Newlines are allowed inside a quoted field per RFC 4180. A multi-line address inside one cell is valid CSV. The diff treats each physical line as a unit, so a newline-bearing field can show changes on the wrapping line.
Line endings (CRLF vs LF) RFC 4180 says CRLF (\r\n). Excel emits CRLF. Most Unix tools emit LF. The editor reads both as a line break, so mixing them between panes does not create changes, and Format converts everything to LF.
BOM (UTF-8) Excel-saved CSVs often start with a UTF-8 BOM (EF BB BF). The Unicode BOM FAQ marks it as optional and unnecessary for UTF-8. Upload strips it. Pasted text that still has one shows a one-character change on line 1 until you click Format.
Delimiter dialects Comma is the default; European Excel exports semicolon (;) because the comma is the decimal separator in many locales. TSV (tab-separated) is a common variant; see the TSV background. Both files must use the same delimiter for a meaningful diff.
Header rows This tool treats line 1 as data. A column rename appears as a single-line diff at the top. If you only want to compare body rows, strip the header from both panes before pasting. Most parsers (Python's csv.DictReader, pandas) treat line 1 as a header by convention but the file format does not require it.
Encoding UTF-8 only via the in-browser FileReader. Latin-1 (ISO-8859-1) and Windows-1252 will load but render garbled accented characters. Convert with iconv or VS Code's "Save with Encoding" before pasting.

CSV diff: frequently asked questions

Will reordering CSV rows or columns produce a noisy diff?

Yes. The engine compares characters line by line, so reordering rows or columns will show as differences even when the underlying data is identical. It is a text diff with a few CSV-aware reading aids. There is no row-key matching, no column reordering awareness, and no semantic understanding of types. For that level of comparison, use a tool like csvkit, pandas with a merge on a primary key, or load both files into SQLite and run an EXCEPT query. For day-to-day spreadsheet comparison, this tool covers most of what you need.

How do I handle CRLF line endings from Windows vs LF on Unix?

You mostly do not have to. Excel writes CSV with CRLF (\r\n), Python's csv.writer typically writes LF (\n), and the editor here splits lines on either, so a CRLF export and an LF export with the same rows show no changes at all. Format also rewrites every ending as LF if you want the text itself cleaned up before you copy it out. RFC 4180 asks for CRLF, but real-world files use both.

Does the tool handle column reordering?

No. This is a line-by-line text diff. If row 1 has columns in the order sku,name,price on the left and name,sku,price on the right, every cell on every line will look changed because the diff sees raw text, not a column model. Same applies if you sort both files on different columns. Reorder columns and rows so they match before diffing, or reach for a row-key-aware tool like csvkit's csvjoin or a pandas merge when the column model matters.

How does the tool handle the UTF-8 BOM that Excel adds?

Excel on Windows often writes a UTF-8 byte order mark at the start of a CSV (the bytes EF BB BF), even though the Unicode BOM FAQ says it is unnecessary for UTF-8. Upload removes it for you, because the browser's file reader drops a leading BOM. Text pasted from an editor can still carry one, and then line 1 shows a one-character change you cannot see. Click Format on that pane and the BOM is gone.

What encodings does the tool accept?

UTF-8 is what the upload expects. A Latin-1 or Windows-1252 file will load but accented characters will look garbled (each é becomes the replacement character, so café shows as caf�). UTF-16 files that start with a BOM are detected and read correctly; UTF-16 without one is not. Convert non-UTF-8 files first: in the terminal, iconv -f WINDOWS-1252 -t UTF-8 input.csv > out.csv; in VS Code, use "Reopen with Encoding" then "Save with Encoding" to UTF-8. Python's csv module and pandas both let you specify the source encoding when reading.

How big a CSV file can I diff?

Up to a few MB is fine and feels instant. Past 10 MB the browser starts to feel it, and most of the cost is rendering the highlighted diff (not computing it). For very large exports (50 MB+), filter both files down to the columns or rows you care about first. csvkit's csvcut and csvgrep, jq for JSON-converted CSV, or a quick awk/grep are all fine pre-passes. Then paste the trimmed slice here.

Is there a limit on how many CSV files I can compare for free?

No. Every comparison is free and none of them needs an account, whether you paste or upload. Ads on the page pay for the hosting. The practical ceiling is file size rather than count, since the diff runs in your browser: a few MB per side is comfortable. Anything you copy or download comes out as plain CSV, exactly as it sits in the pane.

Can it compare two CSV files I upload, instead of pasting?

Yes. Click Upload above either pane and pick a .csv, .tsv, or .txt file straight from disk. The file is read by your browser with FileReader and dropped into the pane as text, so loading it sends nothing over the network. You can upload one side and paste the other if that is easier, then read the diff the same way.

Can it compare Excel or Google Sheets files?

Not the .xlsx workbook directly, since that is a zipped binary, not text. Export the sheet to CSV first. In Excel use Save As and pick CSV UTF-8; in Google Sheets use File then Download then Comma-separated values. Then paste or upload the two CSV exports here. Watch the delimiter: a European Excel may write semicolons, so make sure both sides match.

Can I compare more than two CSV files at once?

No, it compares exactly two, an original and a changed file. A three-way merge or a folder of exports is out of scope. Work through them in pairs instead: Monday against Tuesday, then Tuesday against Wednesday. For set-based work across many files, load them into SQLite or use csvkit and run the comparison there.

Does it work on a phone, or offline?

Both. The page is responsive, though two side-by-side CSV panes are far easier to read on a wide screen than a narrow phone. Everything runs in the browser, so once the page has loaded you can drop your Wi-Fi and the diff still works. There is no server call when you compare, which you can confirm in the DevTools Network tab.

Privacy and how this works

Your CSV stays in your browser unless you press Share. The file reader and the diff run on your machine, and we keep no record of what you paste. Share is the deliberate exception: it saves both panes on our secure servers so the link opens, and deletes them when the expiry you picked runs out. To check the rest, open DevTools, switch to the Network tab, and watch. No request carries your CSV when you compare. The format reference is RFC 4180, and Python's csv module documentation is the reference we cross-check parsing edge cases against.