Developer

Diff Checker

Compare two blocks of text and see added, removed and changed lines highlighted. Word-level and line-level diff, running entirely in your browser.

Need this built for your product?

We design, build & host secure software & APIs.

Talk to an engineer

Line diff versus word diff

A line-level diff marks whole lines as added or removed. It is what version control shows by default and it is right for code, where a line is a meaningful unit. A word-level diff highlights the changed words within a line, which is far more readable for prose where a single edited word would otherwise flag the entire paragraph as rewritten. This tool offers both, because the correct choice depends entirely on what you are comparing.

Why diffs sometimes look wrong

Three causes account for most confusing output. Trailing whitespace differences are invisible but real, so a line that looks identical is reported as changed. Line ending mismatches between Windows CRLF and Unix LF mark every single line as different, which is the classic symptom of a file that has crossed platforms. And inconsistent indentation, particularly tabs converted to spaces by an editor, changes every affected line.

Normalising whitespace before comparison hides these, which is convenient when you care about content and misleading when the whitespace is the bug. Toggle it deliberately rather than leaving it on.

Moved blocks

A standard diff has no concept of a moved block. Cutting a paragraph from one place and pasting it elsewhere shows as a deletion in one location and an unrelated addition in another, with no indication they are the same text. This is a limitation of the underlying algorithm rather than a bug, and it is worth knowing when reviewing a reorganised document.

How the comparison works

Diff tools compute a longest common subsequence: the longest ordering of elements that appears in both inputs, in the same relative order. Everything not in that subsequence is an insertion or a deletion. The algorithm is quadratic in the worst case, which is why very large inputs slow down noticeably, and why most implementations apply heuristics for big files.

Nothing is transmitted

Comparison runs in your browser. Diffing contract drafts, configuration files or anything under NDA against a remote service would disclose both versions; here neither leaves your machine.

Frequently Asked Questions

Privacy & Security

Comparison done locally.

Data: None
Client-side-Side
Active
v1.0

About This Tool

This tool runs entirely in your browser. No data is sent to any server, ensuring complete privacy. Simply use the interface above to get started — no registration or login required.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.