Diff Checker

Paste the original text and the changed text to see exactly which lines were added, removed or kept, with a count and a copyable diff. Free and instant, the comparison runs entirely in your browser.

Diff CheckerPrivate · runs on your device
Original text
Changed text
Differences

Paste two versions above to compare them.

How to use the diff checker

Two boxes and a result list, with no compare button: the result updates as you type or paste.

  1. Paste the older version into Original text.
  2. Paste the newer version into Changed text.
  3. Tick Ignore whitespace to treat lines that differ only in indentation, spacing or trailing spaces as equal, or Ignore case to treat Hello and hello as equal.
  4. Read Differences. Each line has two number columns, one for the original and one for the changed text. Removed lines are marked with a minus on red, added lines with a plus on green, and unchanged lines are plain.
  5. Check the count beside the heading, such as 2 added · 1 removed · 2 unchanged, or the message that the texts are identical.
  6. Press Copy unified diff to copy the result, or Clear both to start again.

The copied text begins --- original and +++ changed, then lists every line prefixed with a space, a minus or a plus. It is a full listing, with no @@ hunk headers and no trimming to context lines, so it reads well in a ticket or chat but is not a patch that git apply will accept.

Typical uses are checking an edited contract or essay against the draft you sent, finding what changed between a working and a broken settings file, confirming that two exports contain the same rows, and reviewing a colleague change when you only have the pasted text. Blank lines count as lines, so a stray empty line shows up as an addition or removal.

A worked example and how the comparison works

Take an original of alpha, beta, gamma and a changed text of alpha, BETA, gamma, delta, one per line. The checker reports 2 added, 1 removed and 2 unchanged, and the copied diff is:

LineMeaning
alphaUnchanged
-betaRemoved
+BETAAdded
gammaUnchanged
+deltaAdded

Tick Ignore case and beta matches BETA, leaving 1 added, 0 removed and 3 unchanged. The unchanged line is shown as it appears on the left. The method is the longest common subsequence: the largest set of lines that appear in the same order in both texts is kept, and the rest are removals or additions. A modified line therefore appears as one removal and one addition, because there is no word-level matching. Ignore whitespace collapses runs of spaces and tabs and trims each line before comparing. Windows and Unix line endings are treated the same, and a missing final newline appears as one extra empty line. If the texts match, the count says they are identical, adding under the chosen options when a checkbox is ticked.

In the result list the left number column refers to the original text and the right one to the changed text. A removed line has only a left number and an added line only a right number, so you can find each change in the source quickly.

When a line diff helps, and when to prepare the text first

A line diff suits text whose structure is lines: configuration files, logs, lists, CSV exports, SQL and source code. It copes badly with prose that has been re-wrapped, because one inserted word shifts every following line and the whole paragraph shows as changed. Wrap both versions identically first. For a list where order does not matter, sort both before comparing using the alphabetical order tool.

  • Compare two JSON responses after formatting both with the JSON formatter, so key layout does not create noise.
  • Strip stray spacing with the whitespace remover, or simply tick Ignore whitespace.
  • Check a deduplicated list against the original with the duplicate line remover.
  • Compare drafts of a contract or essay, then check size with the word counter.

There is a size limit: the line counts multiplied together may not exceed about four million, roughly 2,000 lines against 2,000 lines, and larger inputs show a message instead. A word-by-word view and side-by-side columns are not offered. For code, an editor diff view or Git also pairs up moved blocks and renamed items better than a plain line comparison.

Quick answers

Frequently asked questions

The questions people ask most, answered in plain words.

How does the diff checker compare two texts?

It splits both texts into lines and finds the longest common subsequence, the longest run of lines that appear in the same order in both. Those lines are unchanged; everything else is marked removed from the original or added in the changed text. That gives the smallest set of line edits.

Why does a one-word change show as a whole line changed?

The comparison works on whole lines, so any difference inside a line marks the old line as removed and the new one as added. This is normal for line diffs. This tool has no word-level view, so use your editor inline comparison if you need to see exactly which words changed.

Can I ignore whitespace or capitalisation when comparing?

Yes. Ignore whitespace treats lines as equal when they differ only in spaces, tabs or indentation, which removes noise after reformatting code. Ignore case matches lines regardless of upper or lower case. The output still shows the original text; only the matching step is relaxed.

Can I apply the copied diff with git apply or patch?

No. The copied unified diff lists every line with a space, minus or plus prefix under a short header, but it has no @@ hunk headers, so patch tools will not read it. Use it for reading and sharing, or create a real patch with Git or the diff command.

Is my text uploaded when I compare it?

No. The comparison runs in JavaScript inside your browser, so contracts, source code and private notes never leave your device. Nothing is saved between visits, and reloading the page clears both boxes. You can even disconnect from the internet after the page loads and keep using it.