Diff Checker

Compare two texts and highlight the differences. Runs entirely in your browser.

Original
Modified

How the Text Diff Checker Works — Side-by-Side Comparison Like VS Code

This tool uses a dynamic-programming longest common subsequence comparison. It groups line additions and deletions and applies word-level highlighting to paired changes; its output need not match Git or VS Code.

Features of This Diff Checker

Common Use Cases for Text Comparison

Understanding Diff Output Colors

Frequently Asked Questions

It uses a dynamic-programming longest common subsequence algorithm, not Myers. A minimum line insertion/deletion sequence does not guarantee that the paired modified lines or highlighted words are the only useful interpretation.
The diff checker compares any plain text including source code, configuration files, JSON, XML, SQL, and more. It highlights additions in green and deletions in red with word-level precision, similar to VS Code's built-in diff view. Paste your code in both panels and click Compare.
Yes. Beyond line-level diff, the tool performs word-level highlighting within changed lines. This makes it easy to spot exactly which words or characters were modified, added, or removed — especially useful for reviewing small changes in long lines of code.
The comparison runs locally, but optional saved drafts can retain input in browser storage. Local processing alone does not certify suitability for proprietary code or confidential documents.
The comparison allocates a matrix proportional to the product of the two line counts, with additional work for changed words. Large inputs can consume substantial memory or freeze the page; compare smaller sections when needed.