Diff Checker
Compare two texts line-by-line with a color-coded LCS diff.
Recommended tools
Free CDN, DNS, and edge hosting for developers.
Affordable domains and SSL certificates.
Affiliate links — we may earn a commission if you sign up.
About the Diff Checker
The Diff Checker compares two versions of text line by line using a dynamic-programming LCS implementation, and shows you exactly what was added, removed, and kept. Paste the original into the left textarea and the modified version into the right — both show live line counts — and the comparison recalculates on every keystroke. A color-coded visual panel renders the result in the familiar diff style: green lines for additions, red lines for removals, and gray lines for unchanged context, each prefixed with +, -, or a space. Two switches tune the comparison: Ignore whitespace strips all spacing before matching, and Ignore case lowercases every line, and when the inputs are identical under the active options a No differences badge appears so a clean comparison is never ambiguous. The Unified diff panel below emits standards-compliant patch format with --- original / +++ modified headers, @@ hunk markers, and three lines of context, ready to download as diff.patch. Whether you are reviewing an edited config file, comparing two pasted versions of a contract, or preparing a patch for review, this is the tool for the job.
Examples
Original: The quick brown fox jumps over the lazy dog. Line three is here. A line that will be removed. Line five stays. The end. Modified: The quick brown fox jumps over the lazy dog. Line three is here. A brand new line was added. Line five stays. The end.
--- original +++ modified @@ -1,6 +1,6 @@ The quick brown fox jumps over the lazy dog. Line three is here. -A line that will be removed. +A brand new line was added. Line five stays. The end.
Original: const x = 1; Modified: const x=1; (Ignore whitespace on)
--- original +++ modified
Original: SELECT id Modified: select id (default options)
--- original +++ modified @@ -1,1 +1,1 @@ -SELECT id +select id
How to use
- 1
Paste the earlier version into the Original textarea and the new one into Modified.
- 2
Watch the Added, Removed, and Unchanged stats update as you type.
- 3
Toggle Ignore whitespace or Ignore case if you want those differences suppressed.
- 4
Read the Visual diff card — green added, red removed, gray context.
- 5
Download the Unified diff as diff.patch from the result box.
Common use cases
- Comparing two pasted versions of a config file after an edit.
- Reviewing a contract or document revision for insertions and deletions.
- Checking whether two code blocks differ only in formatting.
- Preparing a patch-style summary of changes for a code review comment.
- Verifying a hand-merged file against the original side by side.
- Auditing what an automated tool changed in a generated file.
Best practices
- Compare whole lines for structure-level review — the line-based LCS aligns moved lines properly.
- Turn on Ignore whitespace when checking reformatted files so indentation noise does not bury real changes.
- Use Ignore case for keyword case-insensitive formats, but keep it off when case is meaningful.
- Read the stats first: if Added and Removed are zero, you are looking at identical inputs.
- Treat the unified output as a report, not a patch file for git apply — headers are generic.
- Load sample first to internalize the green/red/gray scheme before pasting large documents.
Tips
- Toggle Ignore whitespace before comparing minified versus pretty-printed code.
- Read the green and red lines top to bottom — the visual card is often clearer than the patch text.
- When both switches are on and differences remain, those edits are real and worth reviewing.
- Download diff.patch as an attachment to a review so reviewers see the exact hunk context.
Frequently asked questions
Explore more developer tools
Browse the full collection of developer tools on the hub, or jump back to all categories.