Diff Checker
See exactly what changed between two versions.
- Nothing is sent to a server
- Instant results
- Free, no sign-up
Related tools
All text tools- Find and ReplaceBulk edits, with regex when you need it.
- Word CounterLive counts as you type.
- Case ConverterEleven cases, converted as you type.
- Remove DuplicatesDeduplicate a list without losing its order.
- Slug GeneratorTurn a headline into a clean, URL-safe slug.
- Lorem IpsumPlaceholder text, plain or wrapped in HTML.
Questions
How does the comparison decide what changed?
It finds the longest common subsequence — the largest set of lines appearing in the same order in both documents — and reports everything outside it as added or removed. That produces a minimal result: changing one word in the middle of a hundred lines gives you one deletion and one insertion, not two hundred.
Why does a modified line show as both a deletion and an insertion?
Because a line diff only knows about whole lines. Switching on 'highlight changed words' pairs those two lines and runs a second diff over the words inside them, which turns 'this line differs' into 'these two words differ'. It is skipped automatically when the lines have little in common, since a word diff between unrelated lines is noise rather than insight.
When should I ignore whitespace?
Whenever formatting has changed independently of content — reindented code, text copied out of a PDF, or anything that has been through a reflow. Without it, invisible differences in spacing swamp the real ones and the output becomes useless. The option collapses runs of spaces and trims each line before comparing.
Why do the two columns of line numbers differ?
Because each document is numbered independently, which is what makes the output useful. If line 2 was deleted, line 3 on the left is line 2 on the right — both numbers are shown so you can find the same content in either version. A single shared column would necessarily be wrong for one of them.
Is there a size limit?
About 4,000 lines per side. The comparison grows with the product of the two lengths, so two 4,000-line documents mean sixteen million comparisons — the point at which a browser stops being the right place. The tool refuses rather than freezing the tab, so compare a section at a time if you hit it.
Are my documents uploaded?
No. Both versions are compared entirely in your browser, which matters when the thing you are diffing is a contract, unreleased copy or code under NDA. Most online diff tools upload both versions to compare them server-side. This one keeps working with the network disconnected.
About diff checker
How the comparison works
A diff finds the longest common subsequence of the two documents — the largest set of lines appearing in the same order in both — and everything outside it is reported as added or removed. That is what produces a minimal, readable result: change one word in the middle of a hundred lines and you get one deletion and one insertion, not two hundred.
A modified line always shows as a delete followed by an insert, because a line diff only knows about whole lines. Switching on “highlight changed words” pairs those two lines and runs a second diff over the words inside them, which is what turns “this line differs” into “these two words differ”. It is skipped when the lines have little in common, since a word diff between unrelated lines is noise.
The two options that change the answer
- Ignore whitespace collapses runs of spaces and trims each line before comparing. Essential when comparing code that has been reindented, or text copied out of a PDF, where invisible differences otherwise swamp the real ones.
- Ignore case is useful when comparing content that has been through a title-case or sentence-case pass and you only care about the words.
Why the line numbers differ on each side
Each document is numbered independently, which is what makes the output useful. If line 2 was deleted, line 3 on the left is line 2 on the right — and both numbers are shown, so you can find the same content in either version. A single shared number column would be wrong for at least one of them.
Practical limits
The comparison grows with the product of the two lengths, so two 4,000-line documents mean sixteen million comparisons. That is the point at which a browser stops being the right place, so the tool refuses rather than freezing the tab. Compare a section at a time if you hit it.
Everything runs on your device. Contracts, unreleased copy, code under NDA — none of it is transmitted, which is the main reason to use this rather than an online diff that uploads both versions to compare them server-side.
The unified diff
“Copy unified diff” gives you the same format git diff produces: changed lines prefixed with + and -, with a few lines of context around each change and unchanged stretches omitted. It pastes straight into a pull request, a commit message or a bug report.
Related
Browse the rest of the text tools, or make bulk edits with find and replace.