Diff checker — compare two blocks of text

Paste the original in one box and the changed version in the other. You get a line-by-line diff: which lines were added, which were removed, and which stayed the same — with a running count and options to ignore case, whitespace or blank lines.

Added Removed Unchanged

How the diff works

Both boxes are split into lines. The tool then finds the longest common subsequence (LCS) of lines shared between the two texts — the longest run of lines that appears, in the same relative order, in both. Lines inside that shared run are unchanged. Every line left over is either only in the original (removed) or only in the changed text (added). This is the same idea behind the changed-lines view in a version-control tool or a command-line diff utility — nothing exotic, just the textbook algorithm.

LCS(i, j) = LCS(i-1, j-1) + 1 if lineA[i] == lineB[j] LCS(i, j) = max( LCS(i-1, j), LCS(i, j-1) ) otherwise

Computing that table costs roughly (lines in A) × (lines in B) steps, which is instant for anything up to a few thousand lines a side. Past that, the tool trims the comparison rather than let the tab hang — see the limits section below.

The unit of comparison is the whole line, not a word. If one character on a 200-character line changes, the whole line is reported as removed and re-added. That is expected behaviour for a line diff, not a bug — see the FAQ for why an intra-line diff is a different, harder problem this tool does not attempt.

What each option does

Diff options and their effect on the comparison
OptionEffectExample that becomes "unchanged"
Ignore leading/trailing whitespaceTrims spaces and tabs from the start and end of each line before comparing. A line's own internal spacing is untouched."  total: 4" vs "total: 4"
Ignore caseCompares each line lower-cased. The line as typed is still what gets displayed."Status: OK" vs "status: ok"
Ignore blank linesDrops every whitespace-only line from both sides before comparing, so re-spacing a document produces no diff.An extra blank line inserted between two paragraphs

All three can be combined. None of them change what is displayed for a line that is reported as changed — only the underlying text you typed is ever shown.

Worked example

The tool loads with a small example on its first visit — a short config block with one line changed and one line added:

Original

name: Acme Widget version: 1.2.0 color: blue retries: 3

Changed

name: Acme Widget version: 1.3.0 color: blue retries: 3 timeout: 30

The diff above reports name, color and retries as unchanged, the old version line as removed and the new one as added, and the new timeout line as added — for a summary of +2 added, −1 removed. Try editing either box directly to see the output update.

Use cases & limitations

Where this is genuinely useful

  • Comparing two versions of a config file before you deploy one over the other, to see exactly which settings actually changed.
  • Proofreading two drafts of the same document to find every edit, rather than re-reading both in full looking for changes.
  • Reviewing pasted code or JSON before committing it, when you do not have the two versions open in an editor with its own diff view.
  • Checking a translated or localised string list against the source list for lines that were missed or duplicated.
  • Confirming a copy-paste was clean — catching an accidental extra space, a dropped line, or a silently reordered block.

What this tool does not do

  • No intra-line (word or character) diff. A one-character change marks the whole line as removed and added; it will not underline just the changed word.
  • No move detection. A block of lines moved elsewhere in the text is shown as a removal at the old position and an addition at the new one, not as a single "moved" marker.
  • Not a merge tool. It shows differences; it does not combine the two texts, resolve conflicts, or write a result back into either box.
  • No understanding of the file format. Code, JSON, YAML and prose are all just lines of text to this tool — it will not validate JSON or flag a syntax error.
  • Very large inputs are capped. Past roughly a few thousand lines per side the comparison is trimmed and a note says exactly how much was left out, rather than the page hanging.

Frequently asked questions

What is a line diff, and how is it different from a word or character diff?

A line diff compares two texts one line at a time and reports which whole lines are unchanged, added or removed. A word or character diff goes further and highlights exactly which part of a changed line differs. This tool works at the line level — if one word in a long line changes, the whole line is reported as removed and re-added, not just the word.

Why does changing one word show the entire line as removed and added?

Because the comparison unit is the line, not the word. If line 12 changes from version: 1.2.0 to version: 1.3.0, those are two different strings, so the tool reports the old line as removed and the new line as added at the same position. This is exactly how a line diff is supposed to behave — it just is not an intra-line diff.

What does "ignore blank lines" actually do?

It removes every blank or whitespace-only line from both texts before comparing, so a document that only gained or lost blank spacing shows no diff at all. Because the lines are removed from the comparison entirely, they also do not appear in the output — this option hides blank-line noise rather than marking it as unchanged.

Does trailing whitespace or a trailing newline count as a difference?

Trailing whitespace on a line counts as a real difference by default — check “ignore leading/trailing whitespace” to stop treating a stray space or tab at the end of a line as a change. A single trailing newline at the very end of the whole text is never treated as a difference either way: foo and foo\n are read as the same one-line document, matching how most editors save files.

Can I compare code, JSON or config files with this?

Yes — the tool has no idea what language or format it is looking at, so it works the same on code, JSON, YAML, log files or plain prose. It compares lines of text, nothing more. It will not tell you that a JSON document is invalid or reformat it; pair it with a JSON formatter first if you need that.

Is there a limit to how much text I can compare?

The underlying algorithm's cost grows with the number of lines in each side multiplied together, so very large inputs are capped rather than left to lock up the tab: past a few thousand lines per side, the tool compares as much as it safely can and tells you in a note exactly how many trailing lines were left out. Ordinary pastes — a file, a config, a chapter of a document — are well within the comfortable range.

Is my pasted text uploaded anywhere?

No server call is made to compare your text. Both boxes are read directly in your browser, the diff is computed on your device, and what you paste never leaves it. There is no account, nothing is saved between visits, and reloading the page clears both boxes.

What is the difference between the unified and side-by-side views?

Unified shows one column with removed lines, then added lines, interleaved in the order the diff finds them — the same layout most command-line diff output uses. Side-by-side shows the original on the left and the changed text on the right, lined up row for row, which is often easier to scan when whole sections were reordered or rewritten. Both are built from the same comparison; switching between them does not re-run the diff.

Can this tool merge the two versions together?

No. It only shows you what differs — it does not produce a merged file, resolve conflicts, or write anything back to either box automatically. For that you need a merge tool, which is a different job from a diff viewer.

Go deeper