The two versions

What changed

How it works

You paste two versions of a text. DELTA compares them line by line and marks every line added, removed or changed, with the changed words picked out inside each line. The comparison is arithmetic on the two texts, done in this tab.

In more detail

There is no reason a diff should ever leave the machine it is made on

Comparing two pieces of text is pure arithmetic on strings. It needs no model, no service, no account and no network. And yet the ordinary way to do it is to paste both versions into a website, which means handing over both versions of whatever you were comparing.

Look at what people actually diff: two drafts of a letter, a configuration file with credentials in it, a policy before and after someone's edits, a block of code from a client's repository, two versions of a contract, a log fragment from an incident. Those are close to the worst possible list of things to paste into a box on a site you found through a search.

This does the same comparison in the tab. Both texts stay in the page, the result is rendered in the page, and nothing is transmitted because there is nothing on the other end that would want it.

Myers' algorithm, twice

The comparison is Myers' shortest-edit-script, first over lines and then over the words inside a pair of lines that changed. That second pass is what makes the output readable: knowing that line 41 changed is much less useful than seeing that one word in it changed, and without word-level marking a reformatted paragraph looks identical to a rewritten one.

It is about a hundred lines, written here, so there is nothing to download and nothing to load before the page works. The whole thing runs on a phone with no network.

When to use this and when to use REDLINE

DELTA reads text and knows nothing about it. That is a feature: it makes no assumptions, so it works equally on YAML, on a letter, on a CSV, on source code, on a log. Anything you can paste, it can compare.

REDLINE reads .docx and PDF, and it knows what a contract clause is, which is what you want when the question is “what did they change in the agreement I sent back”, and is exactly the wrong tool for everything that is not a contract. Use whichever matches the document, not whichever you opened first.

Two practical notes on reading any diff. Whitespace and line-ending changes will dominate the output if a file has passed between Windows and anything else, and that noise hides the one real change inside it, so normalize before you compare when you can. And a diff tells you what changed, never why: a line that moved is shown as a deletion and an addition, because the algorithm has no concept of moving, and that is the most common way a small edit looks alarming.

Alongside: IMAGEDIFF does the same job for two pictures, STRATA digs the earlier versions out of a PDF that was saved by appending, and LINEAGE reads the editing history a Word file keeps about itself.

Questions people ask about DELTA

Can I compare two Word documents or PDFs?

Not here. Use REDLINE for those; it reads .docx and PDF and shows what moved in a contract. DELTA is for text you can paste or open as a text file.

What does 'ignore spacing' do?

It treats any run of spaces or tabs as one space and ignores space at the ends of lines, so reformatted code or re-wrapped prose does not show as changed. ‘Ignore capitals’ does the same for case.

Why are some unchanged lines hidden?

‘Show only the changes’ keeps two lines of context around each change and folds the rest, the way a code review does. Untick it to see every line of both texts.

Is anything uploaded?

No. Open the network tab in your browser’s developer tools and paste anything you like; nothing goes out.

What is wrong with the online diff sites?

They keep a copy of what you paste. Here the comparison is made in this tab and both texts stay in it; nothing is sent anywhere.

Who can see your file
WhoCan they see it?
YouYes
OBSCURA OSNo. Your file never reaches us.
Someone who breaks into our serversNo. Your file is not there.
Advertisers or partnersNo.
Anyone using your unlocked computer, or a harmful browser extensionYes. Keep your device and browser clean.