Text Diff Checker
Compare two versions of text or code and see exactly what changed.
Paste two versions of text or code and see exactly what changed — additions, deletions, and unchanged lines highlighted side by side — much faster than scanning two blocks of text manually for differences.
Useful for comparing config files, reviewing edits to a document, or checking what changed between two versions of a snippet before committing to one.
What a diff is actually computing
A diff algorithm finds the longest common subsequence between two texts, then reports everything else as an insertion or deletion. There is no notion of 'moved' or 'renamed' — a block relocated from the top of a file to the bottom shows as a deletion plus an addition, because that's what it is to the algorithm.
This is also why reformatting produces enormous diffs. Re-indenting a file changes every line, and the algorithm has no way to know you only changed whitespace unless you tell it to ignore whitespace.
Getting a readable diff
- Turn on whitespace-insensitive comparison when the change is a reformat rather than a content edit.
- Compare formatted versions of both sides. Two minified JSON files produce a useless one-line diff; format both first and the real change becomes obvious.
- Sort before comparing when order is not meaningful — two lists with the same entries in a different order otherwise diff as entirely different.
- Normalise line endings. A file saved on Windows (CRLF) and one saved on Unix (LF) can show every line as changed.
- For a large refactor, review it in pieces rather than as one diff. Structure change and behaviour change reviewed together are reviewed badly.
Frequently asked questions
- Does this ignore whitespace-only changes?
- There's an option to ignore whitespace differences, useful when reformatting (like re-indenting) shouldn't be flagged as a real content change.
- Can this compare entire files, not just short snippets?
- Yes — paste as much text as you need; the diff view scales to longer documents, though very large files may be easier to scan in a side-by-side layout.
- Does the diff work for code as well as plain text?
- Yes — it works line-by-line regardless of content, so it handles code, config files, or any structured or unstructured text equally well.
- Why does moving a block of code show as a delete and an add?
- Standard diff algorithms have no concept of a move — they find common subsequences and report the rest as additions or deletions. Some code-review tools layer move detection on top, but the underlying diff doesn't.
- Is my pasted text uploaded anywhere?
- No. The comparison runs in your browser, so you can safely diff config files or code containing credentials.