文本对比
逐行 diff,标出增删改
Original
Modified
Diff two pieces of text without firing up an IDE
Sometimes the thing you need to compare isn't JSON or code — it's a log snippet, a config file, an essay, or two versions of an email. A line-by-line diff shows you additions, removals, and modifications side by side, with options to ignore whitespace and case so you only see meaningful differences.
Use the comparer when you need to
Compare two log snippets
Paste before-and-after logs to find the line that changed when a deploy went sideways.
Diff prose or release notes
See exactly what changed between two drafts without running git diff or opening an editor.
Verify a copy-paste change
Confirm that the modified version differs only in the way you intended, not in extra invisible whitespace.
How to diff text quickly
- 1
Paste or upload the original text on the left.
- 2
Paste or upload the modified text on the right.
- 3
Toggle ignore whitespace or ignore case if needed, then click Compare.
Keep going
Diff JSON instead
Pick the JSON-aware comparer when both inputs are structured documents.
Format JSON before diffing
Pretty-print both sides first so the diff isn't dominated by indentation noise.
Minify before diffing
Strip whitespace from both inputs to focus the diff on real changes.
Decode encoded inputs
Decode Base64 first when the diff target is encoded text.
Common text-diff workflows
Paste both into the editor to find the entry that's missing or different between environments.
Confirm the new config differs from the old only in the lines you intended to change.
See exactly which sentences changed between drafts of an article or release note.
相关工具
常见问题
JSON Compare 会解析 JSON 并对结构做 diff;这个工具把输入当作纯文本按行对比,更适合日志、配置、文档或任何非 JSON 内容。
当某一逻辑位置上出现“一行被删除、另一行被新增”的情况时,工具会把它们归为一次修改(amber),让你一眼看出是替换而不是单纯增删。
它们会改变行的匹配方式:忽略空白会在比较前合并连续空格并去掉行首行尾空白;忽略大小写会在比较时转为小写(仅用于比较),输出仍显示原始文本。
可以。分别使用两个编辑器上方的 Upload 按钮,把文本文件加载到 Original 或 Modified,然后点击 Compare。