Text diff checker

Compare two blocks of text and see which lines were added, removed or changed.

Runs in your browser. Your input is not uploaded.

What it does

A diff shows the smallest set of insertions and deletions that turns the original into the changed text. Line mode compares whole lines, like git diff. Word mode highlights changes inside lines, which is clearer for prose.

How to use it

  1. Paste the original on the left and the changed text on the right.
  2. Choose line or word mode and whether to ignore whitespace or case.
  3. Read the highlighted result. Removed text is struck through and added text is marked.

Things to watch for

  • A file with different line endings will show every line as changed. Tick Ignore whitespace or convert the endings first.
  • Reformatted JSON looks completely different line by line. Format both sides with the JSON formatter first.

Questions

Is either text uploaded?
No. The comparison runs in your browser with the jsdiff library.
Can I get a unified diff for a patch?
Yes. Copy as unified diff produces the ---/+++/@@ format that patch and git apply read.
How big can the texts be?
Tens of thousands of lines work. Very different large texts take longer because the algorithm’s cost grows with the number of differences.
Can I compare two files?
Open each file into its side with the file buttons. They are read locally.