Text Compare

Paste two versions of a text to see what changed between them, line by line and word by word.

Differences

Paste two texts above to see what changed.

How to read the result

  • Red lines are in the original text but not in the changed text.
  • Green lines are new in the changed text.
  • Lines with both were edited. The words that changed are marked more strongly, so a single changed number or comma is easy to spot.
  • Unchanged lines are folded away when there are many of them. Press “Show … unchanged lines” to open them.

The numbers at the edge are the line numbers in each text, so you can find the same place in your own document. On a phone the result is shown in one column, with − for removed lines and + for added ones. You can switch between the two views at any time.

What the tool is good for

  • Contracts and agreements: check what the other side changed in a new version before you sign, even when they did not use track changes.
  • School and work texts: see what an editor or teacher changed in your essay, article or translation.
  • Lists and data: find which names, products or rows were added to a list or removed from it.
  • Code and settings: compare two versions of a configuration file or a script.

Getting a clean comparison

A comparison is only as clean as the text you paste. Text copied from a PDF often has a line break at the end of every printed line, while the same text from Word has one per paragraph. Then no lines match, even though the words are the same. Copy both versions from the same kind of file when you can.

The two options hide small differences that don't matter. Ignore upper and lower case treats “Contract” and “contract” as the same. Ignore extra spaces treats a double space, a tab or spaces at the end of a line as one space, which helps when a text has been through different editors. Blank lines still count, so an added empty line shows up as a change.

How it works

The tool uses the Myers difference algorithm, the method behind many version control tools. It finds the smallest set of added and removed lines that turns the first text into the second. Edited lines are then compared word by word, so you see exactly which part of the line changed.

Frequently asked questions

How do I compare two texts?

Paste the first version in the left box and the second in the right one. The differences appear below as you type: removed text in red, added text in green, and the changed words inside a line marked more strongly.

Can I compare Word or PDF documents?

Yes, by copying the text. Open each document, select all the text, copy it and paste it into one of the boxes. Formatting such as bold or fonts is not compared, only the words.

Why is every line marked as changed?

Usually because of line breaks. If one version has a line break at the end of every printed line and the other has one per paragraph, no lines match. Spaces and tabs can do the same. Tick “Ignore extra spaces”, or copy both texts from the same kind of file.

Can I compare code?

Yes. The tool compares line by line, which suits code, settings files and lists. Leave “Ignore extra spaces” off if indentation matters, as in Python or YAML.

Is there a size limit?

There is no fixed limit, and texts of tens of thousands of lines work on a computer. When two very long texts have almost nothing in common, they are shown as removed and added in full instead of line by line.

Are my texts uploaded?

No. The comparison runs in your browser, so the texts are not sent to us, not put in the page address and not saved. That makes the tool suitable for contracts and other private documents.