Text Diff Checker Compare two texts line by line — additions in green, removals in red.

Text Diff Checker

Compare two texts line by line — additions in green, removals in red.

What is a diff checker?

A diff checker compares two pieces of text and shows exactly what changed between them. Lines that only exist in the original are marked as removals, lines that only exist in the changed version are marked as additions, and everything else is shown as unchanged. This tool computes the diff with the classic LCS (longest common subsequence) algorithm — the same technique behind the Unix diff command and Git — so the result is the smallest possible set of line changes.

How to use this tool

  1. Paste the original text into the Original text box and the new version into the Changed text box.
  2. Click Compare to see the unified diff below the buttons.
  3. Removed lines appear in red with a - prefix, added lines in green with a + prefix, and unchanged lines have no color.
  4. Tick Ignore trailing whitespace if you only care about content changes, not spaces at the end of lines.

Common uses for a diff checker

Common diff mistakes (and how to fix them)

Pro tip: ticking or unticking Ignore trailing whitespace re-runs the comparison automatically when text is present, so there is no need to click Compare again.

Frequently asked questions

What is a diff?

A diff (short for difference) is a comparison of two texts that shows what changed between them: which lines were added, which were removed, and which stayed the same. It is the standard way developers review changes to code, configuration files and documents.

Is this diff line-based or character-based?

This tool is line-based: it compares whole lines and marks a line as added or removed even if only one character in it changed. That mirrors how the Unix diff command and Git work, and keeps the output easy to scan.

Is my text uploaded to a server?

No. The comparison runs entirely in your browser with JavaScript. Nothing you paste is ever sent over the network, stored, or logged — you can even disconnect from the internet after loading the page and the tool keeps working.

What do the colors and symbols mean?

Red lines starting with a minus sign (-) exist only in the original text — they were removed. Green lines starting with a plus sign (+) exist only in the changed text — they were added. Lines without a color or symbol are unchanged. The status line above the output summarizes the totals, e.g. +3 additions, -2 removals.