How to use Compare Texts

  1. Paste the original text into the first Input Text box.
  2. Paste the changed version into the second Input Text box. You can also load either box from a file with Select files.
  3. Under Comparison Settings, choose Word level or Character level.
  4. Check the Highlighted differences panel, which updates as you type. Text that is only in the second box is shaded green, and text that is only in the first box is shaded red.
  5. Click Copy to clipboard to copy the result as plain text, or Download to save it as diff-output.html.

Examples

Changed word (Word level)

"I am in Lyon" vs "I am in Marseille" -> "Lyon" is marked as removed and "Marseille" as added. "I am in " stays unmarked.

Spelling change (Character level)

"color" vs "colour" -> only the letter "u" is marked as added.

Appended text (Word level)

"Hello world" vs "Hello world here" -> " here" is marked as added.

Good to know

  • Word level treats words, runs of spaces, line breaks and individual punctuation marks as separate units. Changes in spacing and punctuation are highlighted too.
  • The comparison is case-sensitive at both levels, so "Hello" and "hello" count as different.
  • Differences appear inline in a single panel rather than side by side. Removed and added parts are shown next to each other.
  • Comparison runs in your browser using the diff (jsdiff) library, and the output is cleaned with DOMPurify. Neither the tool code nor these libraries sends your text over the network.

Frequently asked questions

Which box is treated as the original text?

The first box. Text found only in the first box is marked as removed (red). Text found only in the second box is marked as added (green).

Can it ignore case or extra spaces?

No. There is no option to ignore them. Both levels compare text exactly, so a change in capitalization, spacing or line breaks is shown as a difference.

What do Copy and Download give me?

Download saves diff-output.html. In that file, changes are wrapped in span elements with the classes diff-added and diff-removed. It has no styles, so the highlights are not colored until you add CSS. Copy to clipboard copies plain text with the removed and added parts run together and the line breaks dropped.

More Text Tools