🔀 Diff Checker
Side-by-side or unified comparison for text, code, JSON, YAML, SQL and more. Up to 2 MB per side with virtual scrolling.
About this Diff Checker
A diff checker finds every addition, deletion, and change between two pieces of text. This tool uses LCS (Longest Common Subsequence) dynamic programming for exact results on files up to ~2,600 × 2,600 lines, automatically switching to a fast greedy hash-based algorithm for anything larger. Word-level and character-level inline highlighting pinpoints exactly which tokens changed within each modified line.
Capacity: Hard limit is 2 MB (~80,000 lines) per side. LCS diff (exact) runs below ~7 million cell-pairs; greedy diff (fast, slightly approximate) handles the rest. Inline diffing is enabled for lines under 400 characters. Virtual scrolling renders 50,000+ rows without any slowdown.
Features
↔ Split & Unified view
Toggle between side-by-side and classic unified patch format.
🔤 Word & char inline diff
Highlights exact words or characters that changed within modified lines.
📂 File upload & drag-drop
Upload any text file — JS, JSON, YAML, Python, SQL, Markdown and more.
⚡ Virtual scrolling
Handles 50,000+ diff rows smoothly via viewport-based rendering.
⬇ Download .diff patch
Export as standard unified patch — compatible with git apply.
🔧 Flexible options
Ignore whitespace, case, blank lines. Adjust context, wrap, line numbers.
🧭 Diff navigation
Jump to the previous or next change with one click.
🔒 100% private
All comparison runs locally in your browser — nothing is sent to a server.
Frequently Asked Questions
How large a file can I compare?
Up to 2 MB (~80,000 lines) per side. For files under ~2,600 lines each the tool uses exact LCS diff, guaranteed optimal. Above that it switches to a greedy hash-based algorithm which is very accurate for typical code files. For extremely large files with huge amounts of differences, splitting into smaller sections gives better accuracy.
What does 'Ignore Whitespace' do?
It collapses all consecutive whitespace (spaces, tabs) into a single space and trims leading/trailing whitespace before comparing. Two lines differing only in indentation or trailing spaces will be treated as identical.
What is the difference between Word and Character level diff?
Word level tokenises changed lines into words and punctuation marks, highlighting only the changed tokens — usually the easiest to read. Character level goes further and highlights individual characters, ideal for spotting single-character typos or subtle string mutations.
What is a .diff patch file?
A unified diff patch uses the standard format understood by git, svn, patch, and most code review tools. You can apply it with 'git apply changes.diff' to replay the changes onto the original file.
Why does my diff look approximate for very large files?
Above ~7 million line-pair cells, the tool switches from exact LCS (which would require hundreds of MB of memory) to a greedy hash-based algorithm. This finds most matching lines correctly but can occasionally miss optimal pairings in blocks with many identical lines. For precise diffs on large files, consider using git diff or the diff command locally.