About Text Diff

Text Diff lines up an old version and a new version and marks every line that was added, removed, or changed. On a changed line it also highlights the exact words that differ, so a one-character edit is easy to spot.

The comparison runs in the page with the browser's own JavaScript. Neither block of text is uploaded, and closing the tab leaves nothing behind.

How to use it

  1. Paste the first version on the left and the second on the right, or load a text file into either side.
  2. Pick a view: side by side pairs the lines, unified shows one column with plus and minus marks.
  3. Turn on 'ignore whitespace' or 'ignore case' if those differences do not matter.
  4. Read the highlighted words on each changed line.
  5. Use 'Copy patch' or 'Save .patch' to take the unified diff into Git or an email.

Common questions

Is my text sent to a server?

No. The diff is computed by JavaScript in the open tab. There is no upload and no stored copy.

Can it show moved paragraphs as a move?

No. The diff is line based, so a moved block shows as a delete in one place and an add in another.

What format is the patch?

A standard unified diff with a configurable amount of context. It applies with patch or git apply.

How large an input can it handle?

Thousands of lines are fine on a normal laptop. Tens of thousands use more memory because the whole comparison is held at once.