A visual diff, in your browser.
Your text is compared in this browser, and your diff becomes a link you can share.
Or paste or type into either pane, or drop in a file — the diff updates as you type. You can also from git, hg, jj or p4. · DocsPaste the output of git diff, hg diff,
p4 diff, or jj diff --git. The changed
files then appear in the Changed files bar below the toolbar — pick one to see what
changed in it. While a diff is loaded the panes can't be edited; click Close diff to
edit again.
A visual diff, in your browser.
Your text is compared in this browser, and your diff becomes a link you can share.
Or paste or type into either pane, or drop in a file — the diff updates as you type. You can also from git, hg, jj or p4. · DocsClick anywhere to dismiss
This diff is encrypted. The link you opened doesn’t include its decryption key, so the diff stays private and can’t be shown here. Ask the person who shared the link to send you the key — they can send it with the Copy key button. Paste the key below and click Open.
Some differences don't matter — timestamps, build IDs, hashes. Any text matching one of the patterns you list below is ignored before the two sides are compared, so a line that differs only in ignored text no longer counts as a change. Everything else on the line still counts.
One pattern per line, written as a regular expression. The greyed-out lines in the box are examples — start typing to replace them.
Everything is editable. Type in either pane and the whole view updates instantly: the coloured bands in the middle, the map on the right, and the counts at the bottom. The status bar shows how long the last diff took to compute.
Each coloured band in the middle column links a block on the left to the matching block on the right. Blue = a block that exists on both sides but differs; green = a block added on the right; red = a block removed from the left. Olive (three-way compare only) = a block where both sides changed the same lines in different ways, so you must choose. A band that tapers to a point marks where a one-sided block belongs on the other side. Click a band to select that change; click the arrow beside either pane to copy the change into the other pane.
To compare three files, open Options and click Compare three files — in a wide window, that button sits on the toolbar as 3-way. (You can also press Ctrl+K and choose the same command.) A third pane opens in the middle for the merged result. Olive bands mark places where both sides changed the same lines differently; resolve those by hand, using the arrows to copy either side into the middle.
The narrow strip on the far right is a map of every change in the entire file, not just the visible part. Click or drag the strip to jump to the corresponding part of the file. The status bar shows how many blocks changed and how many lines were added and removed (+added / −removed).
Each pane has a copy button and a download button in the file bar, next to the pane's name. Your text is saved automatically for your next visit. A diff small enough to fit in a URL is also stored (encrypted) in the page's web address, so you can reload or bookmark the page without losing your text. A very large diff is still saved in your browser, but it is too big to share as a link — copy or download each side instead.
Hide identical sections collapses long stretches of identical lines into a collapsed strip you can click to expand. Hiding is only a reading aid, so the hidden lines reappear automatically as soon as you type. Wrap long lines wraps overlong lines onto the next row instead of making you scroll sideways. Ignore whitespace compares the two sides as if every space and tab had been deleted, so pure reformatting no longer appears as a change. Ignore case ignores capitalisation. Highlight changed words marks the individual words that changed inside a changed line. Lock scroll keeps the two panes (and their horizontal scroll) moving together. Swap sides puts the left text on the right and the right text on the left.
Very large files. On a document of tens of thousands of lines, the status bar briefly shows Rendering… after each edit while the page repaints. Editing and scrolling stay responsive throughout. Wrap long lines is the one exception. Wrapping is done by the browser, which re-flows the whole file at once. Above about 40,000 lines, wrapping is therefore skipped to keep editing fast; the text stays on single lines with a horizontal scrollbar. The wrap setting is remembered and takes effect again as soon as you open a smaller file.
Drag a file onto a pane, or use the folder button in the file bar. The language is guessed from the file extension. To see the tool work on ready-made content, use Load an example in the toolbar — it offers two-way diffs and three-way merges you can then edit.
The Load diff button (by the language menu) takes the output of
git diff, hg diff, p4 diff, or
jj diff --git. Paste the diff and every changed file is
listed in the Changed files bar; pick a file to see what changed in it. Use ◀ ▶ in that
bar to step through the files, or pick any of them; Close diff clears the loaded diff.
Nothing is uploaded — the diff is parsed in your browser. (Riverdiff doesn't fetch changes
from a review server itself — every server has its own API and most want credentials, so you
paste the diff text in instead.)
Copy link puts a link on your clipboard that rebuilds the whole diff in someone else's browser; the ▾ beside it opens the Share dialog (a self-contained full link, or a short link). Your text is encrypted in the browser first, so nothing the server can read is ever uploaded. The Key in link toggle decides whether the decryption key travels in the link (and the address bar): on by default, so a link opens on its own; turn it off and use Copy key to send the key separately — the recipient pastes it in when they open the link. Full details are in About → How sharing works.
The brand at the top-left — Riverdiff · + New diff — clears both panes for a fresh diff (Ctrl+Z brings your text back). If a loaded diff is open, it closes that too.
Riverdiff runs entirely in your browser and keeps working offline once you have opened it — even if the server is down. When your browser offers to install it, an Install button appears on the toolbar; once installed, Riverdiff opens in its own window. The one thing it ever uploads is an encrypted copy the server can't read, kept ready for short links while Auto short link is on — turn it off and your text stays in your browser (see Sharing a diff above, and About → How sharing works). Your text never leaves your browser: there is no store to send it to. The page still fetches its own files and checks for a newer version, as any web page does.
Riverdiff brings the visual side-by-side diff of desktop GNOME Meld to the browser. Paste, type, or drop in two texts (or three, with the merged result in the middle) and see them side by side, with every change linked across the gap by a curved, colour-coded connector band. Each pane stays live-editable, with syntax highlighting and word-level change marks. A single strip maps every change in the whole document.
Three things set Riverdiff apart:
It can also hide identical sections, wrap long lines, search both panes, and ignore whitespace or case. Once you have opened it, it works offline, and you can install it as an app.
Copy link puts a link on your clipboard that rebuilds the whole diff in someone else's browser — no sign-in, nothing to set up. Your diff is compressed and encrypted in your browser (AES-GCM 256). The two link types differ only in where that encrypted copy lives:
| Full link | Short link | |
|---|---|---|
| Where the encrypted copy lives | inside the link itself (#d=) |
uploaded to the link store; the link is a short id (?s=) that fetches the encrypted copy back |
| Link length | grows with the diff (the encrypted copy rides in the URL) | always short, whatever the size of the diff |
| How you get it | Share dialog → Copy full link | Share dialog → Create short link |
Every diff has one decryption key — the address bar and every link carry the same
one, and opening a shared link adopts it. It rides in the link's
#k= fragment and is never sent to a server, so the key is the only secret:
anyone you send a key-bearing link to can open the diff. The Key in link
switch (on by default — on the toolbar, in Options, and in the Share dialog) controls where
that key goes. Leave it on and every link and the address bar carries the key,
so a copied link opens on its own. Turn it off for a
stronger boundary: the links and the address bar go keyless (a screenshot can't leak the
key, and your own reloads still open because the key is stored in this browser), and you
hand the key over yourself with Copy key — the recipient pastes it into the
prompt shown when they open the link.
Auto short link (on by default — the switch beside Copy link, or in Options) keeps this
page's own address bar short by uploading the encrypted copy as you type. A full
#d= URL grows with the diff; a short ?s= link does not.
Turn it off and nothing is
uploaded automatically — a copy is only uploaded if you click Create short link
yourself.
Forget short link stops using the short link and goes back to the full link. Your text stays in the panes and the full link still works. The uploaded copy is deleted as well. Anyone you already sent the short link to can still open it.
Size limits. A short link works for diffs up to about 500 KB; anything larger is rejected by the store, so you get the full link instead. A full link packs the whole diff into the web address itself, so its ceiling is the longest URL the browser will carry — about 1.8 MB. A diff larger than that can't be shared as a link at all — use each pane's Copy or Download button and send the text another way. Because the diff is compressed first, far more text fits than those limits suggest: roughly 30,000 lines of code (both sides combined) fit in a short link, and about 110,000 in a full link. Nearly identical or repetitive content compresses better, so even more fits.
Full documentation — every feature, with details — is at the README.
For engineers. Riverdiff is one self-contained HTML page with no backend: the diff, the rendering, the compression and the encryption all run in your browser. It is open source — the code, the build and the short-link store are all at the README, and you can host your own copy on any static host.