Compare CSV and TXT Files Online

Upload two CSV files to see every changed cell, added row, and removed row

Supported: .csv .txt (tab-delimited)

Original CSV

Drop CSV file here or click to upload
.csv or .txt

Changed CSV

Drop CSV file here or click to upload
.csv or .txt
0 changed +0 added -0 removed 0 unchanged
Quick answer

Upload your original CSV on the left and the updated version on the right, then click Find Differences. Changed cells highlight in yellow with the old value in parentheses. Added rows are green, removed rows are red. No external library needed - all processing runs in your browser instantly.

Key takeaways
  • No dependencies - uses a built-in parser, loads instantly. No SheetJS, no CDN, no wait.
  • RFC 4180 compliant - commas inside quoted fields, newlines inside quotes, and escaped double-quotes are all handled correctly.
  • Whitespace is trimmed - "Alice " and "Alice" are treated as equal, so trailing spaces from database exports don't create false positives.
  • Positional row matching - row N is compared to row N. Sort both files by a unique ID column before uploading if rows may have been inserted or reordered.
  • For .xlsx, .xls, or .ods files, use the Excel comparison tool instead - this tool only accepts .csv and .txt.

How to use our CSV comparison tool

Drop your original CSV file into the left panel and the updated version into the right panel. Click "Find Differences." The diff table appears below showing every row classified as changed, added, removed, or unchanged.

Use the Sample button to load a small example dataset and see how the output looks before uploading your own files. The Swap button exchanges both files without re-uploading. Copy Diff copies the entire result as tab-separated text.

What is a CSV file?

A CSV file is just a plain text file where each row is a record and each value is separated by a comma - like a spreadsheet saved as text. If you opened one in a text editor you'd see something like Alice,alice@example.com,555-0101 on every line. This tool compares two of those files and tells you exactly which lines changed, which are new, and which were deleted.

Here's a concrete example: you export your customer list today (1,247 rows) and again next month (1,263 rows). Without a diff tool you'd have to read through 1,247 rows looking for changes. Upload both files here, click "Find Differences," and you immediately see 16 new customers, 0 removed, and 4 customers who updated their email addresses - in about 1 second.

CSV vs Excel comparison tool

This site has two spreadsheet comparison tools. The main difference is file format support and load time: this CSV tool has no external dependencies and loads instantly, while the Excel comparison tool loads SheetJS (~1 MB) to handle binary formats like .xlsx, .xls, and .ods. If your files are already in CSV or tab-delimited text, this tool is the faster choice.

ScenarioUse this toolUse Excel tool
Pure .csv or .txt files✓ Faster, no CDN loadAlso works
.xlsx, .xls, .ods filesNot supported✓ Required
Multi-sheet workbooksNot applicable✓ Sheet tabs
Low bandwidth / fast load✓ No dependenciesLoads SheetJS (~1 MB)

Common use cases for a CSV comparison tool

Database and API export verification

Most databases and web APIs can export data as CSV. Compare two exports taken at different times to see exactly which records were added, removed, or changed - without writing custom scripts or loading data into a spreadsheet application.

ETL pipeline validation

After running an extract-transform-load pipeline, compare the input CSV against the output CSV to verify that the transformation applied correctly. Any unexpected cell changes immediately surface in the diff.

The most common issue I see in ETL output is type coercion loss - an integer field like 007 becomes 7 after passing through a pipeline that doesn't preserve leading zeros, or a decimal 1.50 becomes 1.5. These look fine to a human but are technically wrong if downstream systems expect a specific format. A CSV diff makes these invisible changes visible the moment you upload both files.

Configuration and seed data changes

Many applications store seed data, reference tables, or feature flags in CSV files. Comparing two versions of a seed file before deploying confirms exactly which rows and values changed, giving you an auditable diff for the deployment record.

How the comparison works

The tool uses a built-in CSV parser - no external libraries are loaded. The parser handles quoted fields (including commas inside quoted strings) and escaped double-quotes per the RFC 4180 standard.

Rows are matched positionally: row N in the original is compared to row N in the changed file. Within each row, cells are compared as strings after trimming whitespace.

RFC 4180 compliance matters more than it sounds. A significant chunk of real-world CSV files have addresses, product descriptions, or notes fields that contain commas - and many simpler CSV parsers break when they hit a value like "Smith, John".

I've seen diff tools report hundreds of mismatches on a file that looked clean, purely because the parser couldn't handle quoted commas and was splitting the row at the wrong position.

This CSV diff checker tool handles it correctly, so if you're comparing exports from Salesforce, HubSpot, or similar CRMs, the quoted field handling will save you from that class of false positives entirely.

Row matching and limitations

This tool uses positional row matching: row N in the original is always compared to row N in the changed file. This works perfectly when records were only appended or modified in place. If a row was inserted in the middle of the file, every row after it shifts by one position and appears as "changed" even if its values are identical.

The practical fix: before uploading, sort both files by a unique identifier column (customer ID, order number, SKU). This ensures the same record lands on the same row number in both files and the positional comparison produces accurate results.

In practice, positional matching catches 95% of real-world use cases cleanly - most CSV exports from databases come out in a consistent order. The edge case is a pipeline that sorts its output differently on different runs, which I've seen happen when a batch job processes records in parallel.

If your diff is flooded with apparent changes and the file sizes are nearly identical, a different sort order is almost always the cause. Sort both files by your primary key and re-run the comparison.

Common mistakes when comparing CSV files

Semicolons instead of commas

In Germany, France, and several other European countries, the standard decimal separator is a comma, so CSV exports from local software use a semicolon as the column delimiter instead. When you upload a semicolon-delimited file here, the entire row is treated as a single column and nearly every row will appear as changed - even if the data is identical.

Open the file in a text editor first and check what character separates the values. If it's a semicolon, do a find-and-replace (replace ; with ,) before uploading, taking care not to replace semicolons inside quoted fields.

BOM characters from Windows and Excel

When Excel saves a CSV in UTF-8 format, it adds a Byte Order Mark (BOM) - three invisible bytes at the very start of the file. If one file has a BOM and the other doesn't, the first cell of row 1 will appear changed even when the values look identical on screen. You can remove a BOM by opening the file in a text editor like VS Code or Notepad++ and re-saving as "UTF-8 without BOM."

Encoding mismatch between files

If one file was saved as UTF-8 and the other as Latin-1 (ISO-8859-1), accented characters like é, ü, or ñ will appear different even when they represent the same letter. This commonly happens when one export comes from a modern system and the other from legacy software. Both files need to use the same encoding before the comparison is meaningful. Re-save both as UTF-8 in a text editor or use a tool like iconv to convert.

One file has a header row, the other doesn't

If your original file starts with a header row (name,email,phone) but the updated file was exported without headers, every row will appear shifted - row 1 of the original (the header) is compared to row 1 of the changed file (the first data record). Make sure both files either include or exclude the header row consistently before uploading.

FAQs about comparing CSV files online

How do I compare two CSV files online?

Upload your original CSV on the left and the updated CSV on the right, then click Find Differences. The diff table shows every changed cell in yellow, added rows in green, and removed rows in red.

Does this handle quoted CSV fields?

Yes. The parser handles quoted fields that contain commas, newlines, or double quotes per the RFC 4180 CSV standard.

Is my data safe?

Yes. No file is uploaded to any server. All parsing and comparison runs in your browser using JavaScript.

Can I compare a CSV against an Excel file?

Not with this tool - it only accepts .csv and .txt files. Use the Excel & CSV comparison tool to compare across formats.

Can I compare tab-delimited .txt files?

Yes. The tool accepts .txt files and automatically detects tab-delimited formatting. Drop a .txt file in and it will parse and compare it the same way as a CSV.

My files look the same but the diff shows differences - why?

The three most common causes are: a BOM character at the start of one file (invisible in most editors), an encoding difference where accented characters are stored differently, or a row inserted in the middle of one file that shifts all subsequent rows. Check for encoding and BOM issues first, then verify both files are sorted the same way.

What if my CSV uses semicolons instead of commas?

This tool expects comma-delimited files. If your file uses semicolons (common in European software exports), replace all semicolons with commas in a text editor before uploading - but be careful not to replace semicolons that appear inside quoted field values.