Text Diff
Compare two versions of text side by side and see exactly what changed, line by line.
A text diff compares two versions of text and shows which lines were added, removed, or unchanged. This is the same technique Git uses to show what changed between commits. Lines prefixed with + (shown in green) were added in the modified version. Lines prefixed with โ (shown in red) were removed. Unchanged lines appear in the middle. Diffs are fundamental to version control, code review, and document comparison workflows.
Frequently asked questions
How does the diff algorithm work?
This tool uses the Longest Common Subsequence (LCS) algorithm to find the largest set of lines that appear in both texts in the same order. Lines in neither the common subsequence are classified as additions or deletions. The Myers diff algorithm, used by Git, is a more efficient variant of the same approach.