Skip to main content

Compare two texts and find the differences

Put the earlier version in Original Text and the later version in New Text, and the checker highlights every insertion, deletion and replacement between them. This guide runs two versions of a short store notice through the checker and explains each highlight and count.

Worked example

Original Text
Our store opens at 9:00 on weekdays.
Parking is free for all visitors.
New Text
Our store opens at 8:00 on weekdays.
Parking is now free for all customers.
Diff Visualization · Diff Mode: Word Mode
Our store opens at 9:008:00 on weekdays. Parking is now free for all visitors.customers.
Added
18
Removed
13
Unchanged
57
Total Changes
31

Changes found

  • 9:008:00
  • now
  • visitors.customers.
Added textRemoved text

Word mode found three changes: two replacements, each shown as the struck-through old word followed by the new one, and one inserted word, shown only in green. The line break and all other words match, so they stay unhighlighted and count as unchanged.

How the checker compares text

  • Word mode, the default, splits text at spaces, tabs and line breaks. Punctuation stays attached to its word, so “visitors.” and “customers.” are compared as whole words.
  • The checker looks for the smallest set of insertions and deletions that turns the original into the new text, so the words after an inserted or deleted word stay aligned.
  • A replacement is shown as the removed text, red and struck through, followed by the added text in green. Unchanged text is not highlighted.
  • Added, Removed and Unchanged count characters, including spaces and line breaks, and Total Changes is Added plus Removed. If both texts are identical, the checker says so instead of showing a diff.
  • For texts more than 1,000 word or character edits apart, the matching start and end are kept and everything between them is shown as one removal followed by one addition.
  • The comparison runs entirely in your browser; neither text is uploaded.

More text comparison guides