Myers beats brute force
The classic Myers diff (1986) runs near linearly for most texts—orders of magnitude faster than naive compare-all combinations.
Tips: Ctrl/Cmd + Enter runs Compare. Ctrl/Cmd + Shift + S swaps sides.
Text comparison, often called "diffing," is the process of identifying the differences between two versions of a text document or code. It's a fundamental tool in programming, document management, and version control, allowing users to quickly see what has changed. While it might seem like magic, the underlying process relies on clever algorithms.
Most diff algorithms, including the one used in this tool, are based on finding the **Longest Common Subsequence (LCS)**. Imagine you have two sequences (in our case, lines or words of text). An LCS is the longest sequence of items that appear in the same order in both, but not necessarily contiguously.
For example, given "ABCDEFG" and "AXBCYDG", the LCS is "ABCDG".
Once the LCS is found, the differences become apparent:
By understanding this process, you can appreciate the sophistication behind simply "spotting the difference" in documents or code.
No. The diff runs entirely in your browser.
By default, it compares words for readability. (Character/line modes may be added soon.)
Yes—use “Copy Diff Output”.
The classic Myers diff (1986) runs near linearly for most texts—orders of magnitude faster than naive compare-all combinations.
Code reviews spend surprising time debating spaces vs tabs. Many teams toggle “ignore whitespace” to prevent holy wars.
Most simple diffs mark a moved paragraph as delete+add. Fancy “move-aware” diffs reattach it, reducing review noise.
Patch files aren’t just for text—game updaters use binary deltas to shrink downloads by reusing unchanged bytes.
Green/red highlights cut review time dramatically; studies show color-coded diffs help humans spot changes faster and with fewer errors.