TEXT DIFF
Text diff, see the changes at a glance.
Paste two texts on the left and right to highlight added, removed and unchanged lines; you can ignore leading/trailing whitespace or case. Ideal for comparing code, copy and config, with one-click copy and local processing.
Everything runs locally in your browser
What does this tool do?
It compares two texts line by line using the longest common subsequence (LCS): unchanged lines are gray, lines only on the right are green (added), lines only on the left are red (removed). Turn on ignore-whitespace or ignore-case to skip trivial differences. The result can be copied to the clipboard in one click.
示例与注意事项Example & notes
一个例子A worked example
把两版合同条款分贴左右两栏,差异行会高亮标出新增与删除,改了什么一眼可见。Paste two versions of a contract side by side and every added or removed line is highlighted.
注意事项Things to watch
- 对比是按行进行的:长段落建议先按句子换行,否则整段都会被标成「全改」。Comparison is line-based: split long paragraphs first or the whole block reads as changed.
- 行尾多余空格也算差异,粘贴后可用「忽略首尾空白」过滤。Trailing spaces count as differences — enable the ignore-whitespace option.
- 涉及隐私的文本建议先脱敏再对比。Mask sensitive content before comparing it.
相关问答More Q&A
能忽略大小写吗?Can it ignore case?
可以,可勾选忽略大小写与首尾空白,减少噪音差异。Yes — ignore case and surrounding whitespace to cut noise.
能直接对比两个文件吗?Can I compare two files?
可以直接拖入两个文本文件,内容会自动填入左右两栏。Drop in two text files and both panes fill automatically.