± Text Diff Checker
Compare two blocks of text side by side and see differences highlighted. Line-by-line and word-level diff view. Free online text diff tool — no signup, works in browser.
How to Use
1
Paste your texts
Paste the original text in the left box and the modified text in the right box.
2
Click Compare
Press Compare to instantly highlight all additions, deletions, and unchanged lines.
3
Read the results
Green lines are additions, red lines are deletions, grey lines are unchanged.
Frequently Asked Questions
How does the diff checker work?
The tool compares your two texts line by line. Lines only in the first text are shown in red (removed), lines only in the second text are shown in green (added), and matching lines are shown in grey (unchanged).
Can I compare code files?
Yes. Paste any code, configuration files, JSON, SQL, or plain text. The tool highlights exactly which lines changed.
What does "ignore whitespace" do?
When enabled, lines that differ only in leading/trailing spaces or tabs are treated as equal. Useful when comparing code that was reformatted.
Is there a size limit?
There is no hard limit, but very large texts (100,000+ lines) may be slow since all processing happens in your browser.
Is my text sent to a server?
No. The entire comparison is done in JavaScript in your browser. Your text never leaves your device.
完整指南:文本差异比较工具
什么时候使用?
逐行比较任意纯文本——文档、合同、服务器日志、配置文件。适用于比较文档草稿、验证数据迁移未丢失内容,以及了解不同环境间配置文件的变化。
如何使用
- 在左侧面板粘贴原始文本。
- 在右侧面板粘贴修改后的文本。
- 选择粒度级别:按行、按词或按字符。
专业技巧
- 按词diff适合散文,按行diff适合代码。
- 比较前统一换行符(CRLF vs LF)以避免误报。
- 比较PDF时先提取文本再使用diff。