Text Diff & Comparison
Side-by-side comparison of two texts with line-by-line highlighting of additions, deletions, and identical lines. Runs purely in browser without server upload.
FAQ
What is text diff?
Text diff compares differences between two texts, marking additions, deletions, and identical content line by line. It's commonly used for code review, version comparison, copy editing, and other scenarios.
What are common use cases for text diff?
Code version difference comparison, article/copy before-and-after comparison, configuration file change checking, log file difference analysis, plagiarism detection assistance, etc.
What do the colors in the comparison results mean?
Green background indicates added lines (only appear on the right side), red background indicates deleted lines (only appear on the left side), white background indicates identical lines in both texts.
Related guide
Comparing Two Versions of a File, and Testing a Regex Before You Ship It
The diff is line-based and has no word-level view — so a Windows-vs-Mac paste marks every line as changed — while the regex tester runs on every keystroke, which is exactly what turns a backtracking pattern into a frozen tab.