Original
Changed
Unified patch
What this does, and where it stops
Everything happens in this tab. The page declares
connect-src 'none', so it cannot make a network request even if
something in it tried to: no upload, no URL fetch, no analytics. That is the
point of it — people diff production configs and proprietary source, and
pasting either into someone else's server is a poor trade.
The engine
Line differences come from Myers' O(ND) algorithm in its linear-space divide-and-conquer form, written from scratch. Before it runs, the shared prefix and suffix are stripped, which collapses the common case — a few changed lines in a large file — to a problem of a few lines. Inside a changed pair, the same algorithm runs again over tokens to highlight the characters that actually moved.
Myers is O(ND) in the edit distance, not the file size, so two large files with little in common are expensive. The search is metered; when the meter trips, a histogram diff takes over, anchoring on the rarest line the two sides share. That result is good rather than provably minimal, and the bar above says so when it happens. A diff that quietly stopped being minimal is a diff you cannot calibrate against.
Patches
The patch this page copies out is a standard unified diff and applies with
git apply. The Patch tab reads the same format:
paste git diff output and it renders side by side, hunk headers
resolved. Both tabs draw from one structure, which is why a pasted patch and a
computed diff look identical.
Syntax colour
One generic lexer handles strings, comments, numbers and a pooled keyword set,
rather than a grammar per language. It reads well for the C family,
JavaScript, Python, Go, Java, SQL, JSON and YAML, and it is knowingly wrong
about # in a language where that is not a comment. Diff colour
always wins over syntax colour: the difference is the signal.
Limits
- 5 MB per pane. Larger input is refused rather than silently truncated.
- No three-way merge, no folder or archive comparison.
- Text comparison only — two JSON documents that differ just in key order are reported as different.
- Nothing is stored unless you turn on Remember my panes, and turning it back off deletes what was kept.