Diff Checker

Compare Two Texts — Free, Private, Unlimited 🔒 Nothing sent to servers
🔒 Your text is never sent to our servers. All comparison runs locally in your browser. Paste confidential code, contracts, or documents freely.
Original
Changed
0 added 0 removed 0 unchanged
Original
Changed

How This Diff Checker Works

This tool uses the Myers diff algorithm — the same algorithm used by Git, GNU diff, and most professional diff tools. It finds the shortest edit script (minimum number of line insertions and deletions) that transforms the original text into the changed text.

Line Diff vs Word Diff

Line diff compares texts line by line. Each line is either unchanged, added, or removed. This is the standard mode for code comparison.

Word diff goes a step further: within each changed line, it highlights the specific words that differ. This is particularly useful for prose editing (contract redlines, document drafts) where you care about exactly which words changed, not just which lines.

Character diff highlights individual character changes — useful for spotting typos, punctuation differences, or single-character code changes.

Ignore Whitespace

When you reformat code (changing indentation, aligning columns), the logic doesn't change — only whitespace does. Enable Ignore whitespace to strip leading and trailing spaces from each line before comparison, so formatting-only changes don't appear as differences.

Privacy

All comparison happens in your browser. No text is transmitted over the network at any point. This tool is safe for confidential documents, proprietary code, legal contracts, and personal writing. You can verify this by opening your browser's Developer Tools → Network tab and observing zero outbound requests during comparison.

Use Cases

  • Developers: Compare config files, API responses, code snippets before and after a refactor.
  • Legal professionals: Compare contract versions to identify added, removed, or changed clauses. Word diff mode is ideal for redlining.
  • Writers and editors: Compare manuscript drafts, check what changed between revisions, verify that tracked changes were applied correctly.
  • Students: Compare essay drafts, check differences between document versions, verify feedback was incorporated.
  • Office workers: Compare spreadsheet exports, report versions, or email drafts.

Keyboard Shortcuts

  • N — Jump to next change (when result is visible)
  • P — Jump to previous change
  • Enter — Run comparison (when focus is in an input pane)

Frequently Asked Questions

No. All comparison happens in your browser using JavaScript. Your text never leaves your device. This tool is safe for confidential documents, proprietary code, and legal contracts. Check your browser's Network tab — zero requests are made during comparison.
This tool uses the Myers diff algorithm (O(ND) algorithm by Eugene Myers, 1986). It finds the shortest edit script — the minimum number of line insertions and deletions — that transforms the original text into the changed text. This is the same algorithm used by Git, GNU diff, and most professional development tools.
Line diff highlights entire added or removed lines. Word diff goes further: within each changed line, it highlights the specific added or removed words. Word diff is especially useful for prose editing and legal contract comparison where you need to see exactly which words changed.
Yes, up to approximately 10,000 lines per side efficiently. A warning is shown above 50,000 characters per input. For very large inputs (100k+ characters), comparison may take 1–3 seconds. The result is always complete — no lines are skipped.
When enabled, leading and trailing spaces on each line are trimmed before comparison, and internal whitespace sequences are normalized to single spaces. This is useful for comparing code that has been re-indented or reformatted without changing its logic.
Unified view shows both versions in a single pane, interleaved: removed lines (red, prefixed with −) appear just before added lines (green, prefixed with +). This is the same format as git diff and Unix diff -u output. It is compact and copy-pasteable as a standard patch.