Diff Checker

Paste two versions of anything — a contract, a config file, an email — and see precisely what moved, was added or was taken out. Both texts stay in your browser.

Runs entirely in your browser — nothing is uploaded

What this does

Paste two versions of the same text and this shows you what actually changed between them — which lines were added, which were taken out, and within the lines that were edited, which words moved. It works on anything made of lines: a contract, a config file, a translation, two drafts of the same paragraph.

Both texts stay in your browser. That matters for the documents people most often need to compare, which tend to be the ones they'd rather not paste into a stranger's server — agreements before signing, credentials in a config file, a colleague's edits to something unpublished.

How to use it

  1. Paste the original on the left and the changed version on the right.
  2. The comparison appears as you type. Switch to the unified view if you prefer one column.
  3. Copy as a patch gives you the result in the standard unified diff format, the one git apply and code review tools read.

How the comparison works

This uses Myers' algorithm — the one behind git diff — which finds theshortest set of changes that turns one text into the other. That sounds like a detail and isn't. A simpler line-by-line walk, comparing line one with line one and so on, reports that everything after an inserted line has changed; you then have to work out for yourself that the document merely shifted down by one. Finding the shortest edit script means an inserted line is reported as exactly that.

Lines that were edited rather than replaced are then compared again, word by word, and only the words that actually differ are highlighted. A line where one date changed shows one date changed, rather than lighting up from end to end.

The options

Whitespace decides whether spacing counts as a difference. "Ignore at line ends" hides the trailing spaces an editor leaves behind — the most common source of phantom changes. "Ignore entirely" also disregards indentation, which is what you want when comparing re-formatted code and not what you want when comparing anything indentation-sensitive.

Ignore case treats Hello and hello as the same line.Ignore blank lines leaves empty lines out of the comparison entirely, so re-spacing paragraphs doesn't register as a change; those lines are left out of the result too, and the line numbers still refer to the real ones in your text.

Is my text private?

Yes. Nothing is uploaded — the comparison runs in JavaScript inside this page, and you can watch the network panel stay silent while you work, or disconnect from the internet after the page loads and carry on. Nothing is stored either: close the tab and both texts are gone.

Frequently asked questions

How large a text can it handle?

Comfortably a few thousand lines a side, which covers most documents and source files. Two very large texts with almost nothing in common are the expensive case — the search space grows with how different they are, not with how long they are — and past a limit the tool stops searching and reports the middle as one wholesale replacement rather than freezing. It says when it has done that.

Can it compare two files rather than pasted text?

Not yet — paste is the way in for now. Most text files open in an editor you can copy from, and for the ones that don't, the PDF and document tools here will get the text out first.

Why is a moved paragraph shown as a deletion and an addition?

Because that is what the standard diff format describes: text removed from one place and added in another. Detecting that a block moved intact is a different and much harder problem, and tools that attempt it are often confidently wrong.

What is a "patch"?

The unified diff format: a plain-text description of the changes, with a few unchanged lines around each one for context. It's what code review tools display and what git applyand patch consume, so it's the most portable way to hand someone a set of changes.

← Browse all Gwibbo tools