Open Source · AGPL-3.0
text.compare logo

text.compare

See exactly what changed.

Compare text, code, documents, data and images. Free, no ads, and comparing happens entirely in your browser.

Two versions of a JavaScript file side by side, with a moved function shown in violet and changed characters highlighted
0
ads, cookie walls or upsells
E2E
encrypted saves, only if you sign in
159
automated tests in CI
AGPL-3.0
free and open source
Why I built it

Comparing text shouldn’t come with ads

Comparing two pieces of text is a simple job, but I got tired of the free diff sites that wrap it in banner ads, cookie walls and upsells. Many of them also upload whatever you paste. That's a bad deal when the text is a contract, a config file with secrets, or your own writing.

So I built the diff tool I wanted instead: fast, clean, private by design, and good at the hard cases like moved code, reformatted JSON, PDFs and Word documents. I made it open source so anyone can check how it works or run their own copy.

typical-diff-site → text.compare
-Banner ads around the editor
-Cookie walls and consent pop-ups
-Upsells to a paid tier for basic options
-Your text quietly uploaded to someone’s server
+A clean editor and nothing else on the page
+Every option free, for everyone
+Comparing never touches the network
+Saving is optional and end-to-end encrypted
+Open source, so you can check every claim
Beyond plain text

Good at the hard cases

text.compare Data view
Data view
JSON compared by structure with key order ignored, and CSV or Excel compared by rows and columns.
text.compare Document mode
Document mode
Prose shown word by word in a readable serif. Opens PDF and Word files directly.
text.compare Image compare
Image compare
Side by side, slider, overlay, or a pixel-difference map that reports how much changed.
Engineering

Private by design, fast by default

Myers O(ND) diff engine

Linear-space Myers with middle-snake bisection and a time budget, so an 8 MB log against an edited copy finishes in about two seconds instead of freezing the tab.

Moved-block detection

Code that moved is shown in violet with a “Moved to line 12” tag that jumps to the other copy, instead of a big deletion plus a big addition.

Ignore what doesn’t matter

Case, whitespace, blank lines, or any pattern: ready-made ones for dates, GUIDs and hex values, or your own regular expressions for log files.

End-to-end encrypted accounts

Optional sign-in syncs your library, encrypted in the browser with AES-256-GCM under a key only your passphrase can unlock.

Share links with no server

The whole comparison is compressed into the part of the link after #, which browsers never send to a server.

Runs anywhere

A folder of static files. Host it on a Raspberry Pi, a $5 VPS, GitHub Pages or Docker, with no database and no outside services.

Run your own copy in a couple of minutes

It's a folder of static files with no database and no server code, so it runs anywhere that serves files.

$ git clone https://github.com/JamesClayPatton/text-compare.git
$ cd text-compare && npm install && npm run build