Compare two texts and see what changed

Paste the original on the left and the new version on the right. Added and removed lines show up as you type, with the changed words marked inside each line. The comparison runs in this tab and nothing is uploaded.

Options

How the comparison works

The tool first lines the two texts up line by line. It finds the longest run of lines that both texts share in the same order, and counts every other line as removed from the original or added in the new version. It uses the algorithm Eugene Myers published in 1986, which is also the default in git diff.

Where a line was removed and another added in the same place, the page shows them as one changed line and compares that pair again word by word. A single edited word is then marked instead of the whole line. Punctuation counts on its own, so a changed comma does not mark the word next to it.

Ignore case treats capital and small letters as equal. Ignore whitespace treats any run of spaces and tabs as one space and skips spaces at the start and end of a line, the same rule as git diff -b. Hide unchanged lines folds long stretches that did not change and keeps three lines of context around each change.

Other ways to compare text

If the two versions are already files in another app, it may have a comparison built in.

  • Microsoft Word

    • Review > Compare > Compare Documents, then pick the original and the revised document. Word opens a new document that shows the differences as revision marks.

    Source: Microsoft Support

  • Google Docs

    • Tools > Compare documents, then choose the document to compare against. Docs creates a third document with the differences as suggested edits.

    Source: Google Docs Editors Help

  • Visual Studio Code

    • code --diff old.txt new.txt opens the two files in a diff editor.

    Source: VS Code command line docs

  • Command line (Git)

    • git diff --no-index --word-diff old.txt new.txt compares two files, even outside a repository, and marks the changed words.

    Source: git-diff documentation

Each step was checked against the vendor's own documentation on 30 November 2026.

Questions

How do I compare two texts?

Paste the first version into Original text and the second into Changed text. The differences appear below as you type: removed text is marked with a minus sign, added text with a plus sign. The buttons above the result switch between the side-by-side and inline views.

Can I compare two files?

Yes, if they are plain text: .txt, .md, .csv, .json, source code and the like. Use Open file above each box. Your browser reads the file on your device and does not upload it. For a Word or PDF document, copy its text into the box, or use Word's own Compare Documents if the formatting matters.

Why is a whole word marked when I changed one letter?

The tool compares whole words, not single letters, so fixing a typo marks the word that holds it. That keeps the result readable when a line has many small edits.

Can I use it to compare code?

Yes. Lines are compared exactly, indentation included. Turn on Ignore whitespace when only the indentation or trailing spaces changed and you want to see the real edits.

Is the text I paste uploaded or saved?

No. The comparison runs in JavaScript inside this tab, and the page never sends or stores your texts. It only remembers your options and the chosen view, in this browser. Page views are counted with Cloudflare Web Analytics, which never sees what you paste.