Utility

Diff Checker

?

About this diff checker

What diff algorithm does this use?
A line-based LCS (longest common subsequence) diff — the same principle tools like `diff` and `git diff` use. Lines decide what counts as added or removed; within a changed line, a second word-level pass highlights just the span that actually differs.
Why is only part of a changed line highlighted?
When a removed line and an added line are paired up as one change, a second word-level diff runs between just that pair and highlights the specific word(s) that differ — so "date" → "date fruit" highlights only "fruit", not the whole line. Lines with no clear counterpart (e.g. a run of 3 removals matched against 1 insertion) fall back to a plain whole-line highlight.
What does "Ignore whitespace" do?
Trims each line and collapses runs of internal whitespace to a single space before comparing — so re-indented code or trailing spaces don’t show up as changes. The original text is still shown untouched in the result.
What does "Ignore case" do?
Compares lines case-insensitively, so `Hello` and `hello` are treated as identical. The original casing is still shown in the result.
Side by side vs. Unified — which should I use?
Side by side shows two aligned columns, like a code review diff — good for wide screens where you want to see both versions at once. Unified shows one column with +/− markers, like `git diff` — more compact and the better choice on narrow screens or for copying as plain text.
Is there a size limit?
Yes — 2,000 lines per side, since the LCS algorithm compares every line of one side against every line of the other and cost grows with the product of both lengths. A single very long line (over 400 tokens) skips the word-level highlight pass for the same reason, but still shows as a normal whole-line change.
Can I compare files directly instead of pasting?
"Load file…" (or dropping a file onto either box) reads it as text and fills that side — handy for XML, JSON, config files, or any other plain-text format. Files over 20MB are rejected with an error rather than freezing the tab.
Does this tool upload my data anywhere?
No. Both inputs — typed, pasted, or loaded from a file — are compared entirely in your browser. Nothing ever leaves your device.

Compare two blocks of text, line by line.

Result appears here…

original lines
0
changed lines
0
added
0
removed
0
status
idle