The Tool Every Code Reviewer Should Bookmark
Code review lives or dies on a single question: what changed? Not "what does this file do now" — that's documentation. Not "is this correct" — that comes after. The first question is always: what exactly is different between what we had and what we're proposing?
GitHub's pull request interface exists to answer that question. The side-by-side diff view, the inline comments, the red-and-green highlighting — all of it is infrastructure built around the act of seeing what changed. It's the central artifact of modern code review.
But there are many situations where you're not in GitHub.
When GitHub Isn't There
A colleague sent you two versions of a configuration file in Slack. Your database schema evolved across several migrations and you want to compare the current state to an older export. A legal team sent you two contracts and wants to know what changed between rounds. A QA engineer is comparing the expected API response to the actual one and needs to see every difference at once.
In each of these cases, what you need is a text diff — the ability to paste two blocks of text and immediately see, highlighted, exactly what differs between them. No git repository. No pull request. Just comparison.
The instinct in many of these situations is to read both texts manually and try to spot differences. This is slow, error-prone, and doesn't scale. A 200-line config file becomes nearly impossible to compare visually with any reliability.
What a Good Diff Viewer Shows
The output of a diff algorithm isn't magic — it's the result of a well-defined computation, usually the Myers diff algorithm or a variant. The algorithm finds the smallest set of changes (additions and deletions) that transforms text A into text B. The output is presented as colored line annotations: additions in green, deletions in red, unchanged lines in the middle.
A well-implemented browser-based diff tool shows you this instantly. No install, no terminal, no git init. Paste both blocks of text into two panels, and the differences appear before you've even lifted your fingers from the keyboard.
Line-Level vs Character-Level Diffs
Line-level diff shows which lines changed. Character-level diff — sometimes called word diff or inline diff — shows which specific characters within a changed line are different. For code review, line-level is usually sufficient. For configuration comparison or contract review, character-level is invaluable: you want to know if someone changed "30 days" to "60 days" in a sentence, not just that the sentence is different.
Practical Use Cases Beyond Code
Diff tools have a surprising range of uses outside of version control. Technical writers compare documentation versions before publishing. Legal teams check contract revisions. Data engineers compare reference datasets for discrepancies. Teachers compare student submissions. In each context, the tool is doing the same thing: mechanically finding differences so you don't have to find them manually.
Paste two versions of any text into the DevToolkit Text Diff tool for instant side-by-side comparison — works for code, config, JSON, plain text, or anything in between.