DiffSnap · Compare

See exactly what changed between two versions.

Compare two texts or two versions of a file and see exactly what changed: aligned columns, the rewritten words picked out inside each line, and a unified patch you can apply.

100% local — nothing is uploadedWord-level highlighting inside each lineUnified .patch and HTML report export
Try it with
Original (A)0
Modified (B)0
Compare by
Nothing is compared until you press this — loading a file never starts it.

No comparison yet

Put a version on each side and press Compare. Everything happens inside this tab — nothing is uploaded.

How it works

1

Bring both versions in

Paste them, drop two files, or let another tool hand one over. Nothing is uploaded, and nothing is compared yet.

2

Say what counts as a change

Lines, words or characters; ignore indentation, case or blank lines. Then press Compare — the expensive step only runs when you ask for it.

3

Read the result

Aligned columns with the rewritten words picked out, untouched blocks folded away, and jump-to-next-change on a single key.

4

Take it away

A unified patch that git apply accepts, a standalone HTML report, or the revised text sent straight into another tool.

Myers, in linear space

The classic O(ND) algorithm with the divide-and-conquer refinement. Memory stays flat however far apart the two files are: 5 000 lines compare in about 7 ms against the 590 ms and 200 MB a plain LCS matrix costs.

Word-level highlighting

A rewritten line is compared a second time, word by word, so what lights up is the three characters that actually moved — not a solid block of red facing a solid block of green.

Indentation is optional

Re-indent a file and a literal comparison calls every single line different. Ignore trailing spaces, all whitespace, letter case or blank lines, and only the real edits survive.

Untouched blocks fold away

One change in a 4 000-line file should not mean scrolling through 4 000 lines. Keep one, three or eight lines of context, and open any folded block with a click.

Pin the alignment yourself

When two moved blocks pair up wrongly, click a line number on each side to pin them together. Each side of a pin is then solved on its own, so one correction never disturbs the rest.

Syntax colour, kept intact

Twenty-two grammars, loaded only when the file needs one. A changed word inside a string keeps the string colour and gains the change background, instead of one wiping out the other.

A patch that actually applies

Real unified diff output with correct hunk headers, so git apply and patch accept it. Or export a self-contained HTML report with no fonts, scripts or assets to host.

Large files stay usable

Big comparisons move to a web worker so the editors keep responding, only the rows on screen are ever mounted, and undo stores the characters that changed rather than a copy of the document.

diff checker

See exactly what changed between two versions.

A diff is usually the first thing you run on something you are not allowed to share: a config with credentials in it, a contract before signature, a patient export, a competitor's quote. DiffSnap computes the comparison inside this tab, so the two documents stay on the machine you opened them on.

Myers' algorithm, running on your machine

The comparison is Myers' O(ND) difference algorithm with the linear-space refinement, written in plain JavaScript and running on your device. There is no upload step, no backend and no request carrying your text: cut your connection after the page loads and everything still works.

A diff checker built for the files people actually compare.

What people use it for

Checking what a colleague changed in a config before it ships, finding the clause that moved between two drafts of a contract, proving a translation matches the source it was made from, reviewing a patch on a machine with no git installed, and settling which of two exports is the current one.

Why local matters here

The documents worth diffing are rarely public: environment files with keys in them, agreements under NDA, exports with customer records. Pasting those into a hosted comparison service hands both versions to somebody else's server in full. Here they never leave the tab, so there is nothing to log, cache or leak.

Frequently asked questions

QHow large a file can it compare?+

Files up to 32 MB open, and anything past 512 KB waits behind a click instead of dropping into the editor unannounced. Past roughly 120 000 characters the comparison moves to a web worker so the page keeps responding. Two files that share almost nothing hit a work limit and are reported as a wholesale rewrite — the tool says so on screen rather than pretending otherwise.

QAre my files sent to a server?+

No. There is no upload and no backend involved: the comparison, the highlighting and every export run inside your browser tab. You can disconnect from the network after the page has loaded and keep using it.

QWhy does it say everything changed when I only re-indented?+

Because by default every character counts, including spaces and tabs. Switch the whitespace option to "Ignore all whitespace" and only the real edits are left. There are matching options for letter case and blank lines.

QDoes it highlight syntax?+

Yes — twenty-two grammars, detected from the file extension or the shape of the text, and loaded only when a comparison actually needs one. Syntax colour and the word-level change highlight are drawn together, so neither hides the other.

QCan I export the result?+

Yes. A unified .patch with correct hunk headers that git apply and patch accept, a self-contained HTML report with nothing external to load, a plain-text summary for a commit message or a ticket, and the revised text on its own.

QThe two versions lined up wrongly. Can I fix it?+

Yes. Click a line number on one side and then the line it belongs with on the other, and that pair is pinned. Everything before and after each pin is compared independently, so one correction never shifts the rest of the file.

Keywords

diff checkertext comparecode diffcompare two filesonline diff toolside by side diffunified diffpatch generatorword diffJSON diffcompare documentsfind differencesmerge reviewfile comparison
Part of the oLoveTools suite
oLoveTools

Free, private, in-browser comparison for text, code, configuration and drafts.

© 2026 oLoveToolsAbout

DiffSnap | Free online text and code diff checker

Compare two texts or two versions of a file side by side. Word-level highlighting, syntax colour, whitespace options, folded context and a unified .patch export — all computed in your browser, nothing uploaded.

Frequently asked questions

How large a file can it compare?

Files up to 32 MB open, and anything past 512 KB waits behind a click instead of dropping into the editor unannounced. Past roughly 120 000 characters the comparison moves to a web worker so the page keeps responding. Two files that share almost nothing hit a work limit and are reported as a wholesale rewrite — the tool says so on screen rather than pretending otherwise.

Are my files sent to a server?

No. There is no upload and no backend involved: the comparison, the highlighting and every export run inside your browser tab. You can disconnect from the network after the page has loaded and keep using it.

Why does it say everything changed when I only re-indented?

Because by default every character counts, including spaces and tabs. Switch the whitespace option to "Ignore all whitespace" and only the real edits are left. There are matching options for letter case and blank lines.

Does it highlight syntax?

Yes — twenty-two grammars, detected from the file extension or the shape of the text, and loaded only when a comparison actually needs one. Syntax colour and the word-level change highlight are drawn together, so neither hides the other.

Can I export the result?

Yes. A unified .patch with correct hunk headers that git apply and patch accept, a self-contained HTML report with nothing external to load, a plain-text summary for a commit message or a ticket, and the revised text on its own.

The two versions lined up wrongly. Can I fix it?

Yes. Click a line number on one side and then the line it belongs with on the other, and that pair is pinned. Everything before and after each pin is compared independently, so one correction never shifts the rest of the file.

Keywords

diff checker, text compare, code diff, compare two files, online diff tool, side by side diff, unified diff, patch generator, word diff, JSON diff, compare documents, find differences, merge review, file comparison