Skip to content

Text Diff Checker

Compare two blocks of text and highlight added and removed lines.

Compared locally — your text never leaves your device.

How do you compare two blocks of text?

A text diff checker compares two versions line by line and highlights every line that was added or removed, with a count of the changes. It uses a longest-common-subsequence diff to match unchanged lines and mark the rest as added (+) or removed (−), so you can see exactly what differs between two versions.

Understanding your result

The tool uses a longest-common-subsequence diff to match unchanged lines and mark the rest as added (+) or removed (−).

Assumptions and limitations

The comparison works line by line, marking whole lines as added or removed rather than highlighting individual words or characters within a line. It reports insertions and deletions but does not perform a three-way merge, resolve conflicts, or understand code syntax — it treats every input purely as plain text.

How to use this tool

  1. Paste the original text on the left.
  2. Paste the changed text on the right.
  3. Press Compare.

About the Text Diff Checker

The Text Diff Checker compares two versions of text and highlights every line that was added or removed, with a count of the changes.

Who should use this tool

Developers comparing two versions of a config file, code snippet, or document, and reviewers checking what changed between drafts. Anyone who has two blocks of text and needs to see exactly which lines were added or removed without setting up a version-control diff will find it immediate and clear.

Benefits

  • Highlights every added and removed line at a glance
  • Counts the total changes between the two versions
  • Matches unchanged lines with a proven diff algorithm
  • Compares text locally with nothing uploaded

Practical use cases

  • Spotting what changed between two config file versions
  • Comparing an original and edited paragraph of text
  • Reviewing differences between two code snippets
  • Checking which lines a colleague altered in a draft

Explore all Developer Tools tools

Frequently asked questions

Is my text uploaded anywhere?

No. The comparison runs entirely in your browser, so nothing you paste is sent to a server.

Does the diff highlight changes within a single line?

No. This checker works at the line level, so an edited line shows as one removed line and one added line rather than pinpointing the changed words inside it. This keeps the comparison clear and predictable, though it means small in-line edits appear as a full line replacement.

How does the tool decide which lines are unchanged?

It uses a longest-common-subsequence algorithm, which finds the largest set of lines appearing in the same order in both texts. Those matched lines are treated as unchanged, and everything else is marked added or removed. This produces the smallest, most sensible set of differences.

Share this tool

Free to use — copy the link, share it anywhere, or add the tool to your own website.

Embed this tool on your site (free)

Copy this code and paste it into any web page — it stays free and always up to date: