Text Diff

Highlight changes between texts

Loadingโ€ฆ

Was this tool helpful?

About this tool

Text Diff compares two blocks of text you paste in and highlights what changed line by line, using the longest common subsequence (LCS) algorithm โ€” removed lines get a red strikethrough, added lines get a green background. Useful for spotting what changed between two versions of a contract, code file, or draft. Comparison happens entirely in your browser, and neither text is sent to a server.

How to use

  1. Paste the original text on the left and the modified version on the right.
  2. The line-by-line comparison appears below as soon as you type.
  3. Red lines (โˆ’) existed only in the original; green lines (+) exist only in the modified version.
  4. The number of changed lines is summarized at the top for a quick sense of scale.

Frequently asked questions

Does it compare line by line or character by character?
Line by line. If even one word changes within a line, the whole line shows up as a removed (โˆ’) and added (+) pair. It does not point out exactly which characters within a line changed.
What happens if a line just moves to a different position?
Because it uses the longest common subsequence (LCS) method, a line that moved shows up as removed from its old spot and added at its new spot. When several lines are identical, which pair gets matched depends on the algorithm.
Does a single extra space count as a change?
Yes. A trailing space or a one-character indentation difference is treated as a different line and shown as a change.
Is the text I paste in sent to a server?
No. Comparison happens entirely in your browser and neither text is sent anywhere.

Similar tools