Writing
Text Diff Checker
Compare two texts line by line. See additions highlighted in green and deletions in red — perfect for finding changes between versions.
| 1 | 1 | Hello world |
| 2 | This is the original text | |
| 3 | It has three lines | |
| 4 | The third line is here | |
| 2 | This is the modified text | |
| 3 | It has an extra line | |
| 4 | The third line was changed |
Frequently asked questions
How does the diff algorithm work?
We use a longest common subsequence (LCS) algorithm to identify matching lines between the two texts. Lines that appear in both are shown as unchanged. Lines unique to the first text are deletions (red), and lines unique to the second are additions (green).
Does this work for files or just small texts?
It works for any text size, but very large documents (thousands of lines) may take a moment to compute since the LCS algorithm has O(n×m) complexity. For most practical comparisons, it's instant.
Can I compare code files with this?
Yes — the diff checker works on any text, including source code. It compares line by line, so it's great for spotting changes in code, configuration files, or documents. For code-specific diffing, tools like git diff offer more features like word-level comparison.
Compare two blocks of text and see exactly what changed. Additions are highlighted in green, deletions in red, and unchanged lines remain neutral — making it easy to spot differences at a glance.
Uses an LCS-based diff algorithm for accurate line-by-line comparison. Perfect for reviewing document edits, comparing code changes, or verifying text modifications before publishing.