Diff Checker
Compare two pieces of text line by line with word-level highlighting
About this tool
The Diff Checker compares two pieces of text line by line and highlights what changed. It uses an LCS (longest common subsequence) algorithm to align matching lines, then a second word-level pass to pinpoint the exact words that were added or removed inside a rewritten line — the same approach git diff and VS Code use.
It works on any text: config files, source code, release notes, log excerpts. Paste the older version on the left and the newer version on the right, or drag a file onto either textarea (or click the 📎 button) to load it directly — no copy-paste needed. Press Compare and you get a unified or split view plus a similarity percentage and add/delete counts. Use the ↑/↓ buttons or press J/K to jump from one change to the next without scrolling — handy on long files. Ignore whitespace collapses runs of spaces/tabs so formatting-only churn (indentation, line endings) is hidden; Ignore case treats HELLO and hello as the same line — handy when only capitalisation changed. Copy Link encodes the two texts into the URL so you can share a comparison or reopen it later.
Example: left The value is 42, right The value is 7 → the tool flags 42 as removed (red, struck-through) and 7 as added (green, bold), keeping The value is unchanged.
FAQ
Is there a file size limit? ›
The comparison runs entirely in your browser, so the limit is your machine's memory. Files of a few thousand lines compare instantly; tens of thousands of lines may take a moment and feel sluggish to scroll.
How does it handle moved blocks? ›
A pure line diff does not detect moves — a line that was deleted in one place and added in another shows up as one red deletion and one green addition. The word-level highlighting inside each pair helps you see they are the same content.
Can I jump between changes without scrolling? ›
Yes. Use the ↑/↓ buttons in the toolbar, or press J (previous) and K (next) on your keyboard — the active change is highlighted with an accent bar and auto-scrolled into view. A counter shows your position, e.g. 3/8.
Does it work for code with different indentation? ›
Yes. Turn on "Ignore whitespace" to treat any run of whitespace as a single space and trim leading/trailing whitespace, so re-indented or reformatted lines are treated as unchanged.
What does "Copy Link" do? ›
It packs both text fields into the URL hash and copies the full link to your clipboard. Anyone opening that link sees the same two texts already loaded and compared — useful for pasting into a code review, chat, or issue tracker.
Is my text sent anywhere? ›
No. Everything runs locally in your browser tab — nothing is uploaded. The shared link contains the text in the URL itself, so be mindful of that if the content is sensitive.
I need to compare two JSON objects semantically — do you have a JSON-specific diff? ›
Yes — use <a href="/json-diff" class="text-accent hover:underline">JSON Diff</a>. It compares JSON by structure (not line by line), detects added/removed/changed keys with full dot-path notation, and generates an RFC 6902 JSON Patch you can apply programmatically.