top of page

Text Compare

Paste two versions of a text and see which lines were added, removed or left alone. Changes are marked with signs as well as colour, and it all runs in your browser.

How to use it

  1. Paste the original text on the left and the changed text on the right.
  2. Choose whether to ignore spaces or upper and lower case.
  3. Read the marked lines, or copy the diff.

Frequently asked questions

Are my texts uploaded anywhere?

No. The comparison runs in your browser and neither text is sent to a server.

How does the comparison work?

It finds the longest run of lines the two texts share, using the Myers diff algorithm, then marks everything else as removed from the original or added in the changed text. The same method is used by many version control tools.

Does it compare words or only whole lines?

Whole lines. If one word changes, the old line shows as removed and the new line as added. It does not mark the changed word inside the line.

What do the ignore options do?

Ignore spaces and tabs treats runs of whitespace as one space and trims line ends before comparing, so re-indented lines match. Ignore upper and lower case treats Apple and apple as the same line.

How large can the texts be?

Up to 10,000 lines each. Texts of a few thousand lines compare in a moment on a typical computer. A very different pair of long texts takes longer.

Why are some unchanged lines hidden?

To keep the page short, long runs of unchanged lines are folded away and three lines of context stay around each change. Press Show unchanged lines to open a fold, or untick the option to see everything.

More free tools

Find and Replace | Remove Duplicate Lines | Text Cleaner | Sort Lines

bottom of page