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.
Most tools process data locally; see this page for details
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.
FAQ
What do the colours mean?
Added lines have a green background, removed lines a red one, identical lines stay neutral. Comparison is line-aligned, so inserting a new line in the middle does not make every following line look like a delete-then-add pair — you see the genuinely changed positions.
When should I tick ignore whitespace or case?
Tick Ignore whitespace when reviewing code, since formatters (Prettier, go fmt) often produce large indentation-only changes that are not real edits. Tick Ignore case for prose proofreading. Do not tick it when JSON key case carries meaning.
How much text can it handle?
A few thousand lines is comfortable. Line alignment is done in the browser, so very large inputs (a full log file, say) get slow — use a command-line diff or git diff for those.
示例与注意事项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.