Advertisement
Advertisement

Free online diff checker — compare two texts or code snippets and see the line-by-line differences, in your browser.

Advertisement

About the diff checker

Paste your original text on the left and the changed version on the right — the differences appear below as a unified diff the moment you stop typing. Removed lines are marked - (red), added lines + (green), and unchanged context lines keep a leading space, exactly like git diff. Turn on Ignore whitespace or Ignore case to hide changes you don't care about. Everything runs locally in your browser.

Is my text uploaded anywhere?

No. The comparison runs entirely in your browser with JavaScript — the two texts are never sent to a server, so the tool works offline and is safe for private code, logs, and documents.

What kind of diff is this?

A line-based diff computed with Myers' shortest-edit algorithm — the same approach Git uses — presented as a unified diff with hunks and surrounding context. The output is a valid patch you can copy and apply with patch or git apply.

What do "Ignore whitespace" and "Ignore case" do?

Ignore whitespace collapses runs of spaces and tabs and trims each line before comparing, so re-indentation or trailing-space changes don't show up. Ignore case compares letters case-insensitively. Both only affect the comparison — the diff still displays your original text exactly.

Can it compare JSON, YAML, or code?

Yes — it compares any text line by line, so it works for JSON, YAML, CSV, source code, logs, or prose. For structural JSON comparison, format both sides first (with the JSON formatter, optionally sorting keys) so the diff lines up cleanly.

Is there a size limit?

Very large inputs (thousands of differing lines) fall back to a coarse whole-block diff to stay fast and within memory — you'll see a note when that happens. Typical files, configs, and snippets get a full, precise diff.

Collapse the page

Both options play the collapse and reload this site fresh from the network. They differ in what they take with them.

Refresh files
Drops the offline cache and service worker. Your saved inputs and settings are kept — use this if the site is serving something stale.
Erase everything
All of the above, plus every tool's saved input — including your JWT and HMAC keys — and your settings. Deleted from your device, not sent anywhere. This cannot be undone.