# CSVファイル2つを比較

> 2つの書き出しファイルの間で、追加・削除・変更された箇所がわかります。

Human page: https://unmakelabs.com/ja-jp/compare-two-csv-files/. This is the version for AI agents.

## What it does

2つのCSVの差分を比較。行はIDで照合します。 2つの書き出しファイルの間で、追加・削除・変更された箇所がわかります。

## 行の位置ではなくIDで照合します

5行目同士を比べる方法では、1行挿入されたり並べ替えられたりした時点で比較が崩れます。このツールは、商品番号、顧客番号、銘柄コードなど、両方のCSVで各行を識別する列を見つけ、その列で行を照合します。そうした列がない場合は、まず内容が完全に一致する行を移動先に関係なく組み合わせ、残りは共通するセルの数で照合します。

## 結果の見え方

2つの表を左右に並べて表示します。変更されたセルは黄色（マウスを重ねるかタップすると変更前の値を表示）、追加された行は緑、削除された行は赤で示し、追加・削除された列も表示します。ダウンロードできるのは、概要、変更ごとに1行の一覧（キー、列、変更前の値、変更後の値）、すべての変更を色分けした新しいファイルを含むExcelレポート、または変更一覧のCSVです。

## Facts

- **比較対象:** .xlsx同士、CSV同士、またはその組み合わせ。区切り文字・文字コードは問いません
- **検出内容:** 変更されたセル、追加・削除された行、並べ替えられた行、追加・削除された列、「01000」が1000になった箇所
- **保存形式:** 色分けしたExcelレポート（.xlsx）、変更一覧のCSV
- **プライバシー:** お使いの端末上で比較し、何もアップロードしません

## How a person does it

1. **2つのファイルを選ぶ.** 「2つのファイルを選択」をタップし、旧版と新版をまとめて選びます（古い方が旧版として扱われます）。1つずつ選ぶこともできます。
2. **結果を確認する.** 変更・追加・削除された行の数が表示されます。下の2つの表には変更のある行だけが表示されます。すべて表示するにはチェックを外してください。
3. **レポートをダウンロードする.** 「レポートをダウンロード」をタップすると、色分けしたExcelファイルを保存できます。行が誤った列で照合された場合は、結果の下でキー列を選んでください。

## Open a file by link (works today)

The viewer runs in a browser. Any public file URL can be opened by adding `?src=` (URL-encoded): `https://unmakelabs.com/ja-jp/compare-two-csv-files/?src=https://unmakelabs.com/apps/xlcompare/samples/nyse-listed-2026-12-01.csv`. The host must allow cross-origin reads (GitHub raw, most object storage and CDNs do). A camera view can be added after `#`: none: files never go in a link. `?old=<public file URL>&new=<public file URL>` opens two files the visitor's browser can fetch (CORS).

Embed: `<iframe src="https://unmakelabs.com/embed/xlcompare/?src=<url-encoded file URL>" width="100%" height="480" style="border:0"></iframe>`.

## Good to know

比較するのは値で、数式や書式は比較しません。数値は数値として比較します（ドイツ式CSVの1,5はExcelの1.5と同じです）。CSVには型がないため、CSVの75001は数値の75001とも文字列の75001とも一致しますが、Excelファイル同士では文字列と数値の違いは型の変更として扱います。編集内容がわかっている自動生成の120組（120組すべてで全編集を検出し、それ以外の誤検出なし）と、公開オープンデータの実ファイル5組でテストし、すべて別の方法による検証結果と一致しました。

## Not done by this tool

- 数式、色、コメント、グラフは比較しません
- 古い.xlsファイル、PDF、30 MBを超えるファイルはブラウザーで開けません
- 2つのファイルの結合（マージ）はしません

## Value

Compares two versions of a table, in the browser: two .xlsx files, two CSV files or one of each. Columns are matched by name; rows are matched by a key column found automatically (an ID that is unique and filled in both files, such as an article, customer or ticker number) or chosen by the visitor, otherwise by their content (identical rows first, wherever they moved, then by shared cells). Every matched row is compared cell by cell, telling a changed value from a changed type (the text '01000' against the number 1000, a date stored as text). Both tables are shown side by side with changed cells, added and removed rows marked; the download is a highlighted .xlsx report (summary, one row per change, the new file with every change coloured) or a CSV list of changes. A program checks every result: every row of both files is accounted for exactly once and every cell not listed as changed is equal; the report is read back and checked. Nothing is uploaded. Free, no sign-up.

## When it fits

- Someone gets this month's price list, stock list or customer export and needs to know what changed against last month's.
- Someone has two versions of a spreadsheet that went back and forth by email and needs the differences cell by cell.
- Someone checks an export from a new system against the old one (same rows, same values, nothing lost).

### When not

- Comparing formulas, formatting or charts (the tool compares values and their types).
- Old binary .xls files, PDFs or files over 30 MB in the browser.

## Why use it instead of the alternatives

- Nothing to install: the tool opens two public files by link (?old=, &new=) in any browser, phones included, and can be embedded (/embed/xlcompare/).
- The engine has no DOM; a server copy for agents (POST two files, get the report and a JSON list of changes) is prepared and not live yet.
- Excel's Spreadsheet Compare (Inquire) needs Windows and Office Professional Plus; online compare sites upload both files to their servers; Excel formulas (VLOOKUP/XLOOKUP) need building per file and miss added rows, re-sorted rows and type changes.
- This tool matches rows by their key automatically, works with CSV and .xlsx mixed, keeps both files on the device, and proves its result by program.

### What rebuilding it would take

- Read both files (CSV encodings and separators, .xlsx sheets) into typed tables and match the columns by name.
- Find a key column that is unique in both files, match rows by it or by content, and compare every cell telling value from type changes.
- Write a highlighted .xlsx report, read it back, and prove that every row is accounted for and every unlisted cell equal.
- Plus a test set of generated pairs with known edits and real public file pairs, scored by program.

## Quality

No score published; the limits above say what it does not do. Check results that matter before you rely on them.

## Risk for the user

- Free and unlimited; no sign-up, no ads.
- Files are read on the user's device and never uploaded.

_Status: CSV and .xlsx compare, the highlighted .xlsx report and the CSV list of changes work in the browser; the agent API is prepared (same engine under Node), not live._

## Privacy

- Files are read on the user's device and not uploaded; there is no share link for files.
- The page loads Papa Parse and fflate from unmakelabs.com itself; no third-party code host is contacted.
- The optional AI summary sends only the change list (first 60 changes) after a click and a confirmation.

## Data

比較はブラウザ内で行われ、ファイルはお使いの端末から出ません。アップロードは一切ありません。

## FAQ

- **2つのCSVファイルの差分を比較するには？** ここで両方のバージョンを選ぶだけです。ID列で行を自動的に照合してすべてのセルを比較し、変更されたセル、追加・削除された行を表示します。色分けしたExcelレポートをダウンロードできます。
- **行の順番が違っていても大丈夫ですか？** 問題ありません。行は位置ではなく、キー（または内容）で照合します。並べ替えられた行は別に集計され、変更としては扱いません。
- **CSVとExcelファイルを比較できますか？** はい。各ファイルをそれぞれの文字コード、区切り文字、シートで読み込み、数値や日付は値として比較します。
- **Excelがなくても、Macでも使えますか？** はい。Windows、Mac、Linux、iPhone、Androidのどのブラウザーでも動作します。Excel標準の比較ツールにはWindowsとOffice Professional Plusが必要です。
- **本当に無料ですか？** はい。広告なし、登録不要、制限もありません。
- **ファイルはアップロードされますか？** いいえ。2つのファイルはどちらも、お使いの端末上でこのページの中で読み込まれます。
- **AIエージェントでも使えますか？** エージェントはリンクで2つの公開ファイルを開けます（このページのURLに ?old= と &new= でファイルのアドレスを付けます）。レポートと変更点のJSON一覧を返すサーバー版は準備済みですが、まだ公開していません。
- **運営者は？** Unmake Labs（Julien Salomon）です。お問い合わせ：hello@unmakelabs.com

## Related pages

- [2つのエクセルファイルを比較](https://unmakelabs.com/ja-jp/compare-two-excel-files/)
