LCS-Based Line Diff Algorithm
This tool uses a Longest Common Subsequence (LCS) algorithm to find the maximum set of lines that appear in both texts in the same order. Lines that are only in the original are marked as removed (red -); lines only in the modified text are marked as added (green +); common lines are unchanged.
Word-Level Diff
When Word diff mode is enabled, each changed line is further split into words and the same LCS algorithm is applied at the word level. This shows exactly which words were inserted or deleted within a line, making small textual changes much easier to spot.
Unified Diff Format
The Copy unified diff button produces output in the standard unified diff format used by git diff and patch. Each hunk starts with a @@ header indicating line numbers, followed by context lines (space), removed lines (-), and added lines (+). This format can be applied to files using the patch command.
Line-Level vs Word-Level
Use line-level diff for code review, configuration file changes, or any comparison where lines are the logical unit. Use word-level diff for prose, documentation, or to see fine-grained edits inside long lines.
Save history & custom presets — coming soon for logged-in users