Your files stay on your device

Compare two texts

Paste two versions and see exactly what changed, line by line or letter by letter.

Original

Loading editor…

Changed

Loading editor…

Differences

Reading a unified patch

A unified patch shows changed lines with a few unchanged lines around them as context. A line starting with a minus sign was removed, a line starting with a plus sign was added, and a line starting with a space stayed the same. The hunk header lists where each span starts and how many lines it covers, so @@ -1,3 +1,3 @@ means both versions start at line 1 and span three lines.

A small worked example

Start with three lines, red, green, and blue, and change green to Green. The patch looks like this. With ignore capitals on, the two texts match, so nothing is reported.

redContext line, unchanged
-greenRemoved from the original
+GreenAdded in the changed text
blueContext line, unchanged

Line versus character mode

  • Line mode treats each line as one unit, so a single changed letter marks the whole line as different.
  • Character mode finds the smallest changed spans, which suits short edits to a sentence. It takes more work as input grows, so long inputs run slower in character mode.

Was this tool useful?