⚖️ 比較 · ハイライト · パッチ

テキスト比較ツール

2つのテキストを比較し、並列統合、またはインラインビューで差分をハイライト。Myersアルゴリズムを使用 — GitやGitHubと同じ。

Original (A)

変更版 (B)

ブラウザで完全に動作する本格的な差分ツール

This page implements the same Myers diff algorithm that Git, GitHub, GitLab, VS Code and most "diff" tools use. It finds the shortest edit script — the smallest sequence of insertions and deletions to turn one text into the other. The result is a clean, intuitive comparison without spurious "everything changed" noise.

3つの表示モード

3つの比較粒度

無視オプション

なぜMyersで単純なアルゴリズムではないのか?

Naive longest-common-subsequence diff is O(N·M) in time and memory — fine for a few hundred lines but slow on real files. Myers' algorithm is O(N·D), where D is the size of the actual diff. For typical inputs (most lines unchanged), D is small and the algorithm runs in near-linear time. Our implementation handles 500-line diffs in milliseconds.

プライバシー

Both texts are diffed entirely in your browser tab. We don't upload, we don't log, we don't analyze. No external library is loaded — the algorithm is ~120 lines of vanilla JavaScript embedded in the page.

エクスポート

The Copy as unified patch button copies a diff -u-style patch to your clipboard, ready to paste into a GitHub comment, a Slack message, or to save as a .patch file.

よくある使用例

よくある質問

この差分チェッカーはどのようにテキストを比較しますか?
Myersの差分アルゴリズムを使用します — Git、GitHub、VS Codeと同じものです。あるテキストを別のテキストに変換するための最短編集スクリプト(最小の挿入と削除)を見つけ、誤検出のないクリーンな比較を生成します。
このツールはテキストをサーバーにアップロードしますか?
いいえ。両方のテキストは約120行のバニラJavaScriptを使用してブラウザタブ内で完全に比較されます。アップロード、ログ記録、外部分析は一切行われません。タブを閉じればデータは消えます。
どのビューモードと粒度オプションがありますか?
サイドバイサイド、ユニファイド(git形式)、またはインラインモードで差分を表示できます。比較粒度は行、単語、または文字に設定できます。意味のある変更に集中するために、空白、大文字小文字、空行を無視することもできます。
差分チェッカーの一般的な使用例は何ですか?
設定ファイルのバージョン比較、法的契約の修正を単語単位で検証、APIキーやURLの1文字のタイプミスの発見、AI生成ドラフト間の変更確認、Gitにコミットせずに共有可能なパッチの生成などに使用されます。
この差分チェッカーは本当に無料ですか?
はい、制限なしで100%無料です。サインアップ、ファイルサイズ制限、使用上限、プレミアムティアはありません。必要な回数だけテキストを比較できます。このツールは広告サポートのみです。

関連ツール