Text Diff Checker
Paste two versions and see what changed — line by line, with the edited words highlighted inside each line.
By opening this website or using its tools, you agree to our Terms and Privacy Policy.
Explain what changed
Optional. Uses your browser's own on-device model, and is sent only the changed lines — the diff above needs no model at all.
Checking what this browser can run…
Your file never leaves your browser during processing
How it works
To compare two texts, paste the original on the left and the changed version on the right — the differences are computed in your browser and shown line by line, with the changed words highlighted inside each modified line. Nothing is uploaded, and the result can be copied as a standard unified diff.
The comparison uses Myers’ diff algorithm — the same one git uses — which finds the shortest sequence of insertions and deletions that turns one text into the other. That is what makes the output minimal: a line moved or a word changed shows up as exactly that, rather than as everything from the edit onwards being marked as different, which is what a naive line-by-line comparison produces.
Once the line diff is done, each removed line is paired with the line that replaced it and the two are diffed again by word, so a one-word change reads as a one-word change instead of a whole line being struck out and rewritten. Pairing is positional within a block of changes, deliberately: scoring lines for similarity across a block starts inventing pairings that were never edits of one another, and a word diff between two unrelated lines is noise dressed up as insight.
Long identical stretches are collapsed to a few lines of context around each change, which is why a large file with one edit shows the edit rather than the file. The whitespace, case, and line-ending options change what counts as equal, not what is displayed — "ignore line endings" in particular is what makes a file saved on Windows compare cleanly against the same file saved on a Mac. Both texts stay in your browser; the network counter below the tool records what happens during processing.
FAQ
Is my text uploaded to compare it?
No. The diff is computed in your browser as you type, and the live network counter below the tool shows zero bytes sent during processing.
What is the difference between the unified and side-by-side views?
They show the same diff. Unified stacks removals and additions in one column, which is what a patch or a code review comment looks like. Side by side puts the original and the changed version in two columns, which is easier for reading prose.
Can I copy the result as a patch?
Yes — "Copy as unified diff" produces standard unified diff text with @@ hunk headers, which is the format git apply and most review tools expect.
Why does it sometimes say it could not compute a minimal diff?
Myers’ algorithm costs time proportional to the number of differences, so two entirely unrelated documents of a few thousand lines each would take long enough to freeze the tab. Past that point the changed section is shown as a whole-block replacement instead — still accurate, just coarser, and the tool says so rather than quietly returning a worse result.
What does the AI explanation add?
It summarises what changed in plain English, using a language model your browser provides on-device where one exists. It is given only the changed lines, never both documents in full, and the diff itself works with no model at all.