Text Tools

Text Diff Checker

Compare two texts side by side and see inserted and deleted lines and characters highlighted.

Loading tool…

How to use the Text Diff Checker

  1. Paste the original text on the left and the changed text on the right (or click “Load example”).
  2. Choose whether to ignore whitespace or letter case, then click Compare.
  3. Read the result: removed lines are marked − and added lines +. When a line was edited, the exact characters that changed are underlined or struck through.
  4. Use Swap to reverse the comparison, Copy diff to take a plain-text version, or Clear to start over.

Good to know

  • The comparison is line-based (Myers’ shortest-edit algorithm), then characters are compared inside lines that were changed. Line endings (Windows or Unix) are treated alike.
  • Copy diff produces unified-style text: “- ” before removed lines, “+ ” before added lines and two spaces before unchanged lines, for the whole text rather than only the changed hunks.
  • Character highlighting pairs the first removed line with the first added line of each changed block, and so on. Lines longer than 2,000 characters, or lines that share very little, are shown as whole-line changes.
  • To keep the page responsive each side is limited to 5,000 lines and 200,000 characters. Larger inputs show a message instead of freezing the tab.
  • If two texts differ almost entirely, the search for a line-by-line match is stopped early and the unmatched part is shown as all removed then all added. A notice says when this happens.
  • Ignoring whitespace trims each line and collapses runs of spaces and tabs; ignoring case compares letters case-insensitively. The original text is still what is displayed.

Examples

An edited sentence
“The launch is on Monday.” vs “The launch is on Tuesday.” → one line removed, one line added, with “Monday” and “Tuesday” highlighted inside them.
A new line
Adding “Budget is attached.” between two existing lines shows exactly one added line (+) and every other line unchanged.
Whitespace only
“a b” vs “a b” are different by default but identical when “Ignore whitespace differences” is on.

Frequently asked questions

Is the text I compare uploaded?

No. The comparison runs in your browser and the text is never sent to a server or saved.

Can it compare files?

Paste the file contents into the boxes. The tool compares text only; it does not read files or compare formatting.

Why are some edited lines shown as a removal and an addition?

A diff has no “edit” operation: a changed line is one line deleted and one inserted. The tool then highlights the characters that differ between the pair.

Built By Engineers

Need Something Built For Your Business?

aimEncoders designs and builds custom software, websites and internal tools, backed by automated QA.

  • Reply within 1 business day
  • Fixed quote, no surprise invoices
  • You own 100% of the code

Free discovery call • Straight to a developer • Strict NDA available

Text Diff Checker – Compare Two Texts and Highlight Changes | aimEncoders