Compare Two Excel Files and Fix the Differences

Upload your master file and the file you want to check. Choose which column matches the rows (for example SKU or ID) and which columns to compare. You get every difference in one list, and one click gives you a corrected copy of the second file. The second tab works on one account statement: it finds the same amount in debit and credit (an invoice and its payment) and lets you delete both entries or keep one before you download the fixed file.

FreeNo sign-upRuns in your browser: your data is not uploaded

File 1 · Master The correct data No file yet. You can also drop it here.
File 2 · To check The file that may have mistakes No file yet. You can also drop it here.

Your files stay on your computer. Nothing is uploaded.

How the comparison works

File 1 is your master: the data you trust, such as the official price list, the payroll export or the stock count. File 2 is the copy someone else edited, a supplier sheet, or an export from another system. The tool reads both files in your browser, pairs each master row with a row in the second file, and checks every column you chose cell by cell.

  • Match rows by: pick a column whose value is unique per row, such as SKU, item code, employee number or invoice number. Rows are paired by that value, so the two files can be sorted differently. You can pick two columns (for example Invoice + Line) when one is not unique on its own.
  • Compare: columns whose values must be the same in both files.
  • Ignore: columns you do not care about, such as notes or a last-edited-by column.

Columns with the same heading are paired automatically, even if they sit in a different position. If the headings differ (for example "Price" and "Unit Price"), pick the right one from the list.

What the results mean

  • Different: the row exists in both files but a cell has another value. You see the old value crossed out and the master value next to it.
  • Missing: the row is in the master but not in the file you are checking.
  • Extra: the row is in the file you are checking but not in the master. It may be a new item that the master does not have yet, so it is not removed unless you tick it.
  • Duplicate: the same match value appears twice in the file you are checking. The first one is compared; the others are listed so you can remove them.

The corrected file

When you choose Yes, fix and download, the tool opens the file you checked, writes the master value into every ticked cell, adds the ticked missing rows at the bottom and removes the ticked extra or duplicate rows. Column widths, fonts and other sheets stay as they were when the file is .xlsx. Changed cells are filled yellow, new rows green, and a Changes sheet lists each edit with the old and new value, so you can review the corrections before you send the file on.

If you only need to know what is wrong, download the report only: one sheet listing every problem, with filters on the header row.

Same amount in debit and credit (account statements)

An account statement lists invoices on the debit side and payments on the credit side. When an invoice is paid, the same amount appears twice: once in Debit and once in Credit. The third tab pairs them so you can clear the settled items and see what is still open.

  1. Same invoice, same amount: the debit and the credit have the same amount and the same invoice number in the notes (for example INV-2101-1018). This is the safest match.
  2. Invoice paid in parts: one invoice on the debit side and two or more payments that mention the same invoice number and add up to the invoice amount (for example 12,420.00 paid as 230.00 + 12,190.00).
  3. Same amount only: no invoice number links the rows, but the amounts are equal. The tool picks the closest earlier debit and marks the match "please check". If the two rows mention different invoice numbers, the match is set to "Not a match" until you change it.

Statements exported from accounting systems often glue a date straight onto the invoice number ("INV-2101-274205/09/2024"). The tool cuts it back to the invoice number it finds elsewhere in the statement, so these receipts still pair with their invoice. Rows that read "Grand Total" or "Total" are left out of the matching and recalculated in the fixed sheet.

For every match choose one of four options: Delete both entries (the invoice and its payment both leave the statement), Keep the debit, delete the credit, Keep the credit, delete the debit, or Keep both when it is not a real match. Buttons above the list set every match at once, and you can still change single matches after that. Deleting both sides never changes the closing balance; keeping only one side does, and the final review shows total debit, total credit and closing balance before and after so you see it before you download. The Excel file keeps your original sheet untouched and adds a Fixed sheet (same layout, running balance, serial numbers and totals recalculated) and a Matches sheet listing every pair, your decision, the rows with no match and every deleted entry. Open this tab directly with /tools/excel-compare#same-amount.

Tips for clean results

  • Keep the default options on. Most false differences come from "ABC" vs "abc", a trailing space, or a number stored as text ("1,250.00" vs 1250).
  • If your sheet has a title or logo above the table, set the Header row to the row with the column names.
  • Dates are compared as dates, not as text, so 05/01/2026 and 2026-01-05 stored as real Excel dates match.
  • Formulas are compared by their last calculated value. In the corrected file a fixed cell holds the plain value from the master.
  • Large files (tens of thousands of rows) work, but the browser may take a few seconds. Close other heavy tabs if it feels slow.

Related tools

Use the days between dates calculator for date ranges and working days, and the VAT calculator to check prices with VAT added or removed.

FAQ

Are my Excel files uploaded to a server?
No. Both files are read and compared inside your browser, and the corrected file is created on your computer. Nothing is sent to HeadsNTail or anyone else.
Can I compare files where the rows are in a different order?
Yes. Set a column such as SKU, ID or invoice number to "Match rows by" and rows are paired by that value, whatever their position.
Which file formats work?
Excel .xlsx, .xlsm and .xls, plus .csv and OpenDocument .ods. The corrected file is always saved as .xlsx; formatting is kept when the file you checked is .xlsx or .xlsm.
Will the tool delete rows on its own?
No. Extra and duplicate rows are only listed. They are removed from the corrected file only if you tick them.
How do I match invoices and payments in an account statement?
Open the "Same amount in debit and credit" tab and upload the statement. The tool pairs each payment with the invoice of the same amount, using the invoice number in the notes, and also finds invoices paid in several parts. For each pair choose delete both, keep the debit, keep the credit or keep both, then download the fixed statement.
Will deleting matched entries change the closing balance?
Deleting both entries does not: the invoice and its payment have equal debit and credit, so the closing balance stays the same and the running balance is recalculated row by row in the Fixed sheet. Keeping only the debit or only the credit does change it, and the final review shows the new balance before you download.
Why does it say a value is different when it looks the same?
Usually one cell holds a number and the other holds text, or there is a hidden space or a different date. Keep "Ignore extra spaces" and "Treat 1,000 and 1000.00 as the same number" on; if it still shows, check the cell format in Excel.

Embed this calculator on your website

Put the live calculator on your own page (blog post, HR portal, client site). Paste this where you want it to appear; it is free, loads from HeadsNTail and always uses the current rates. Keep the credit line under it.

Embed code (HTML)
<iframe src="https://headsntail.com/embed/excel-compare" title="Compare Two Excel Files &amp; Fix Differences" loading="lazy" style="width:100%;max-width:720px;height:760px;border:0;border-radius:16px;background:#0f141b" allow="clipboard-write"></iframe>
<p style="font-size:13px"><a href="https://headsntail.com/tools/excel-compare">Compare Two Excel Files &amp; Fix Differences</a> by HeadsNTail</p>

Works in WordPress (Custom HTML block), Blogger, Webflow, Notion (embed block with the iframe URL) and plain HTML. Height can be changed in the code.

Found it useful? Put a link in your docs, README or forum answer so others can use it too:

HTML
<a href="https://headsntail.com/tools/excel-compare">Compare Two Excel Files & Fix Differences</a> (free, by HeadsNTail)
Markdown (GitHub, Stack Overflow, dev.to)
[Compare Two Excel Files & Fix Differences](https://headsntail.com/tools/excel-compare)

Need a website, HR or business system? HeadsNTail builds websites, HR and payroll apps and business tools. See services or ask a question.