Diff Tool
Paste two blocks of text, JSON, or code and see exactly what changed. Additions, deletions, and unchanged lines — all highlighted instantly.
// drag original file here to load it
// drag modified file here to load it
🔍 Line by line diff
Every line is compared and color coded — green for additions, red for deletions, neutral for unchanged lines.
📋 JSON mode
Paste two JSON objects and get a clean, formatted diff. Both sides are pretty-printed before comparison.
📊 Change summary
See at a glance how many lines were added, removed, and unchanged — so you know the scale of the change immediately.
🔄 Swap inputs
Flip original and modified with one click — useful when you're not sure which version is which.
⚡ Live comparison
Results update automatically as you type — no need to click Compare every time you make a change.
🔒 100% private
Your code, configs, and text never leave your browser. Safe to use with production configs and sensitive data.
How to use the Diff Tool
How diff algorithms work
The most common diff algorithm is Myers' algorithm, which finds the shortest edit script to transform one text into another. It produces results in terms of lines added (shown in green) and lines removed (shown in red). Git uses a variation of this algorithm. Character-level diffs go deeper — instead of comparing whole lines, they highlight the exact characters that changed within a line, making small changes much easier to spot.
Unified vs side-by-side diff
Unified diff shows both old and new content in a single column, with removed lines prefixed with - and added lines with +. This is the format used by git diff and patch files. Side-by-side diff shows old and new content in parallel columns, making it easier to compare the full context of both versions. Use unified for patch workflows, side-by-side for code review.
Common use cases for diff tools
Developers use diff tools to compare config file versions before deploying, review API response changes between environments, check what changed between two log files, compare database migration scripts, validate that template output matches expected output in tests, and review changes to generated code before committing. The DevCrate Diff Tool is particularly useful for quick ad-hoc comparisons without opening a full IDE.
Reading a diff output
Context lines (unchanged) are shown without a prefix. Lines starting with - were in the original but not the new version. Lines starting with + are in the new version but not the original. The @@ markers in unified diff indicate the line numbers of the changed section in both the original and new file.