Text Diff Checker

Compare two blocks of text line by line and see exactly which lines were added, removed or left unchanged.

Differences
  apples
- bananas
+ blueberries
  cherries
  dates
+ figs
  elderberries

2 added, 1 removed

Lines added
2
Lines removed
1
Lines unchanged
4
Lines by change type
Unchanged: 4 (57.1%)Added: 2 (28.6%)Removed: 1 (14.3%)7lines
  • Unchanged457.1%
  • Added228.6%
  • Removed114.3%

Runs entirely in your browser. Nothing you enter is uploaded.

How it works

Paste the original on the left and the edited version on the right. The checker finds the longest sequence of lines the two versions share — the longest common subsequence — and reports everything else as an addition or a removal. This is the same idea behind the classic Unix diff tool and the "changes" view in Git.

Lines starting with "+ " exist only in the changed text, lines with "- " exist only in the original, and lines indented by two spaces are identical in both. A line that was edited shows up as one removal followed by one addition.

Turn on "ignore whitespace" to skip differences in indentation or trailing spaces, which is handy when comparing code reformatted by an editor. Both texts stay in your browser; nothing is uploaded.

Frequently asked questions

Can it highlight changes within a line?

This tool compares whole lines. For prose, put each sentence on its own line first to get a finer-grained comparison.

Why does a moved line show as removed and added?

A line diff only knows about order. When a line moves, the shortest description is to delete it in one place and insert it in another.

Is there a size limit?

Comparison time grows with the product of the two line counts, so very large files (thousands of lines each) are refused to keep your browser responsive.

esc