Text Compare (Diff Checker)

Compare two text files and highlight the differences.

Original Text

Changed Text

Removed Added
Result will appear here...

Missing a tool?

Tell us what you'd like us to build next. We read every suggestion, and your email is optional.

What this tool does

Text Compare (a "diff checker") finds every difference between two versions of a text and marks what was removed and what was added.

How to use it

  1. Paste the original on the left and the changed version on the right.
  2. Choose how to compare: by Words, Lines or Characters.
  3. Click Find Differences. Removed text is struck through in red, added text is highlighted in green, and a count appears above the result.

Which mode to use

  • Words: best for prose, such as articles, emails and contracts. A changed word shows as one removal and one addition.
  • Lines: best for code, lists and data. Any change marks the whole line, which keeps the result tidy.
  • Characters: best for short strings, IDs and typos, where a single letter matters.

Whitespace

With Ignore whitespace off (the default), changes to spaces, tabs and line breaks count, and changes made only of whitespace are shown with visible marks: · for a space, → for a tab and ↵ for a line break. That's how you catch a stray trailing space or a tab where spaces should be. Tick the box when only the words matter; in Lines mode it ignores spaces at the start and end of each line. The Characters mode always counts every character.

A worked example

Original: "The tenant pays rent on the 1st of each month." Changed: "The tenant pays rent on the 5th of each month, by bank transfer."

  • Words shows "1st" removed, "5th" added and ", by bank transfer" added: the clearest view for a contract.
  • Lines marks the whole old sentence as removed and the new one as added. Tidy, but you have to spot the changes yourself.
  • Characters shows "1s" removed, "5" added and an "h" added. Exact, but hard to read in prose; it's best for codes and IDs.

How the comparison works

The tool uses jsdiff, an open-source library based on Eugene Myers' 1986 algorithm, "An O(ND) Difference Algorithm and Its Variations". It finds the shortest list of removals and additions that turns the original into the changed text, which is why a changed word shows as one removal plus one addition. The same algorithm is the default in git's diff.

Frequently asked questions

Is my text uploaded?

No. The comparison runs in your browser, so it's fine for private documents.

Why does a small edit show up as a big change?

In Lines mode, changing one word marks the whole line. Switch to Words or Characters to see exactly what changed inside it.

Sources: jsdiff documentation (the comparison library this tool uses: diffWords, diffWordsWithSpace, diffLines and diffChars). Eugene W. Myers (1986), "An O(ND) Difference Algorithm and Its Variations", Algorithmica 1, 251-266. Last reviewed on SuiteWebTools: October 2026.