Diff Checker
Compare two texts line by line with character-level highlights.
What this diff tool does
Paste two versions of anything made of lines — source code, a configuration file, a contract, a log excerpt — and it computes the smallest set of insertions and deletions that turns the first into the second. That is the same model git diff uses, so the output will look familiar: removed lines in red with a leading minus, added lines in green with a plus.
Where a removed line is followed by a closely related added line, the changed characters inside it are highlighted as well. That is what turns “this whole line changed” into “the timeout went from 30 to 60”, which is usually the thing you actually wanted to know.
How to use it
- Paste the original on the left and the new version on the right.
- Press Compare, or use Ctrl/⌘ + Enter.
- Turn on Ignore whitespace when a reformat has touched indentation and you only care about real changes.
- Leave Collapse unchanged lines on for large files — long runs of identical lines are folded away so the differences stand out.
How the comparison works
The tool implements Myers' diff algorithm, published in 1986 and still the basis of Git, Subversion and most editors' comparison views. It finds a shortest edit script: the minimum number of line insertions and deletions needed to get from one text to the other. That minimality is what stops diffs from drifting out of alignment after an inserted block, which is the usual failure of naive line-by-line comparison.
The similarity percentage is the share of lines that ended up unchanged. It is a rough guide, useful for spotting whether two documents are minor revisions of each other or genuinely different.
Frequently asked questions
Is my text uploaded?
No. The comparison runs in your browser, so contracts, credentials and unreleased code are safe to paste. Many comparison sites post both documents to a server — which is worth checking before pasting anything confidential into one.
How large can the inputs be?
A few thousand lines per side compares instantly. Very large and very different inputs are the expensive case, because the algorithm's cost grows with the number of differences rather than the file size; if that limit is reached the tool says so instead of freezing.
Why is a line shown as removed and added rather than modified?
Because a line-based diff has no concept of modification — a changed line is a deletion plus an insertion. The character-level highlighting inside those paired lines is what makes the actual edit visible.
Does it work on JSON or XML?
Yes, though formatting matters: two JSON documents that are semantically identical but printed differently will show many changes. Run both through a formatter with the same settings first — and for JSON, sorting the keys removes ordering noise entirely.
Can I compare files rather than pasted text?
Open each file and paste its contents. Keeping the input as plain text is deliberate: it means nothing is read from your disk without you choosing it.