A diff checker compares two blocks of text and shows you exactly what changed โ which lines were added, which were removed, and which stayed the same โ colour-coded so the differences jump out. Paste the original on the left and the changed version on the right, and the tool above builds a unified, line-by-line comparison in your browser. Nothing you paste is transmitted anywhere.
What is a text diff?
A “diff” (short for difference) is a structured comparison of two versions of the same text. Instead of forcing you to read both versions side by side and spot changes by eye, a diff tool aligns the two inputs and reports the minimal set of edits that turns the first into the second. This is the mechanism behind code review, version control systems like Git, and the “track changes” feature in document editors.
The comparison here works at the line level. Each line from the original is matched against the changed text, and every line falls into one of three buckets:
- Unchanged โ the line exists in both versions, shown in neutral colour with a leading space.
- Removed โ the line was in the original but not the changed version, shown in red with a leading minus sign.
- Added โ the line is new in the changed version, shown in green with a leading plus sign.
How the comparison works
Under the hood the tool computes the longest common subsequence (LCS) of the two line lists. The LCS is the longest ordered set of lines that appears in both inputs; anything outside it must have been added or removed. This is the classic, well-understood approach that underpins most diff utilities, and it produces a clean, minimal result rather than naively marking everything after the first change as different.
A short worked example. Suppose the original is three lines โ alpha, beta, gamma โ and the changed version is alpha, delta, gamma. The LCS is alpha and gamma, so the diff keeps those two as unchanged, marks beta as removed, and marks delta as added. With word-level highlighting on, the tool pairs the removed and added line and points to the single word that actually changed.
Ignore whitespace and word-level highlighting
Two toggles refine the result. Ignore whitespace compares lines after collapsing internal spaces and tabs and trimming the ends, which is handy when a file has been re-indented or has stray trailing spaces that you do not care about โ the real content changes still show, but pure formatting noise disappears. Word-level highlighting takes each changed line, pairs the old and new version, and runs a second diff across their words so only the words that differ are shaded, making a one-character edit inside a long line easy to find.
Common use cases
| Scenario | What the diff shows |
|---|---|
| Reviewing a code change | Exactly which lines were edited before you commit or paste them back |
| Comparing two config files | Which settings were added, removed, or retuned between environments |
| Checking an edited paragraph | The specific sentences or words a reviewer changed |
| Spotting log differences | New or missing lines between two runs of a program |
Tips for a clean diff
Line-based diffs are most useful when the two inputs are already broken into comparable lines. For structured data such as JSON, format both sides with the same indentation first so the tool compares meaning rather than layout. For prose, a paragraph that wraps as one long line will diff as a single unit โ split it into sentences if you want finer granularity, or lean on word-level highlighting. And remember the panes are directional: the left side is always treated as the original.
Is it safe to paste sensitive text here?
Yes โ this tool never sends your input anywhere. Both the line-level and word-level comparisons happen with JavaScript running on your device. There is no server round-trip, no logging, and no third-party analytics on this page. All text is escaped before it is displayed, so pasting code or markup cannot break or hijack the page. For the most sensitive material you can load the page once and then work offline.