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.

Last reviewed by the Radiatus Cloud team

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.

Related tools

  • JSON Formatter — Format and beautify JSON in your browser. Pinpoints syntax errors by line and column, flags unsafe integers, and never uploads your data to a server.
  • JSON Validator — Validate JSON syntax with precise line and column errors, and check documents against a JSON Schema. Runs locally in your browser, nothing uploaded.
  • Regex Tester — Test regular expressions against sample text with live match highlighting, capture groups and flag control. Runs entirely in your browser.
  • HTML Minifier — Minify HTML by removing comments and redundant whitespace, without breaking inline elements or pre blocks. Runs entirely in your browser.

Frequently Asked Questions

Why are identical-looking lines marked as different?

Almost always trailing whitespace, a tab-versus-spaces difference, or mismatched line endings between Windows CRLF and Unix LF. Enable whitespace normalisation to confirm, but turn it back off if whitespace is what you are actually checking.

Should I use line diff or word diff?

Line diff for code, where the line is the meaningful unit and it matches what version control shows. Word diff for prose, where highlighting one changed word is far more readable than flagging the whole paragraph.

Why does a moved paragraph show as delete plus add?

Standard diff algorithms have no concept of a move. They compute a longest common subsequence, so relocated text appears as an unrelated deletion and insertion. This is inherent to the approach, not a defect in the tool.

Is there a size limit?

The algorithm is quadratic in the worst case, so very large inputs slow down noticeably. For comparing large files, a dedicated command-line diff or your version control system will be considerably faster.

Is my text uploaded to compare it?

No. The comparison runs entirely in your browser, so contract drafts, configuration files and confidential material never leave your machine.

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.