CSV File Difference
Compare two CSV files by a key column and export differences
CSV File Difference — what it does
Compare two CSV files on a shared key column and get three lists: rows added in the second file, rows removed from the first, and rows whose values changed. The report can be downloaded, which turns an ad-hoc comparison into something you can attach to a ticket or an audit trail.
When this tool helps
- Checking what a nightly export actually changed since yesterday's copy before loading it into a system.
- Verifying that a bulk edit changed only the records it was supposed to change.
- Reconciling a supplier price list against the version you currently have loaded.
How to use it
- Load the first CSV and then the second.
- Select the key column that identifies a row in both files.
- Process the comparison.
- Review added, removed and changed counts, then download the report.
Accuracy, limits, and good practice
- The key must be unique in both files. Duplicated keys make row-to-row matching ambiguous and the results unreliable.
- Column order does not matter, but column names do — a renamed header reads as a removed field rather than a changed value.
- Formatting-only differences such as 1000 versus 1,000 register as changes; normalise numbers and dates first for a meaningful diff.
Frequently asked questions
What if the two files have different columns?
Comparison works on shared columns keyed by your chosen field. Align the schemas first with the column extractor for a clean result.
Can it compare files with no key column?
Not reliably. Without a key, there is no way to know which row in one file corresponds to which row in the other.
Does it detect reordered rows as changes?
No. Matching is by key, not by position, so reordering the same data produces no differences at all.
Related tools on this site
- Excel Workbook Viewer — Open XLSX or XLS files, switch worksheets, search values, and preview cells locally
- TSV & CSV Converter — Convert tab-separated data and CSV text in either direction
- CSV Outlier Detector — Find numeric outliers with the interquartile-range method
Everything above runs inside this page. CSV File Difference needs no account, no upload, and no server round trip — close the tab and nothing is left behind.
CSV 檔案差異比較能做什麼
以共同的鍵值欄位比較兩份 CSV,並產出三份清單:第二份新增的列、第一份被移除的列,以及值有變動的列。報告可下載,讓臨時的比對變成能附在工單或稽核紀錄上的文件。
什麼時候用得上
- 在把每日匯出檔載入系統前,確認它相對昨天的版本到底改了什麼。
- 驗證批次修改是否只動到預期範圍內的紀錄。
- 把供應商新的價格表與目前使用的版本核對。
使用步驟
- 先載入第一份 CSV,再載入第二份。
- 選定兩邊都能識別同一列的鍵值欄位。
- 執行比較。
- 檢視新增、移除與變更筆數,再下載報告。
精確度、限制與實務建議
- 鍵值在兩份檔案中都必須唯一,鍵值重複會讓逐列比對出現歧義,結果不可信。
- 欄位順序不影響比較,但欄位名稱會:標題被改名會被判讀成欄位消失,而非值有變動。
- 純格式差異(如 1000 與 1,000)也會被視為變更,建議先統一數字與日期格式再比對。
常見問題
兩份檔案欄位不同怎麼辦?
比較會以你選的鍵值針對共同欄位進行。建議先用欄位提取工具讓兩邊結構一致,結果才乾淨。
沒有鍵值欄位可以比嗎?
無法可靠比較。沒有鍵值就無從得知一邊的某列對應另一邊的哪一列。
資料列順序調換會被當成變更嗎?
不會。比對依鍵值而非位置,同樣的資料換順序不會產生任何差異。
本站相關工具
- Excel 活頁簿檢視器 — 在本地開啟 XLSX 或 XLS、切換工作表、搜尋內容並預覽儲存格
- TSV 與 CSV 互轉 — 在 Tab 分隔資料與 CSV 文字之間轉換
- CSV 離群值偵測 — 使用四分位距方法找出數值欄位中的離群值
以上步驟全部在這個頁面內完成,CSV 檔案差異比較 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。