Finding what changed between two versions by eye is slow and unreliable, whether it’s a contract revision, a config file or a block of code. A diff shows every addition and deletion at once, so nothing slips through.
Uses
- Code review: compare a snippet before and after a fix.
- Writing and legal: see what changed between drafts of an article or agreement.
- Config and data: compare server configs, environment files or exports.
- Debugging: find the one line that differs between a working and a broken file.
How to use the Diff Checker
- Paste the original version on the left and the changed version on the right.
- Read the result: green lines were added, red lines removed, and changed words are highlighted inside them.
- Tick Ignore whitespace or Ignore case to hide differences that don’t matter.
- Download the differences as a .patch file or copy the unified diff.
Features
- Line-by-line comparison with line numbers for both versions.
- Word-level highlighting inside changed lines.
- Options to ignore whitespace, ignore case, or show only changed lines.
- Unified diff output compatible with git apply and patch.
- Private: contracts, code and documents never leave your browser.
Frequently asked questions
How does the diff work?
It finds the longest set of lines both texts share, then marks everything else as added or removed, using the same approach as git and other diff tools. A removed line followed by an added one is shown as a change with the differing words highlighted.
Can I compare JSON files?
Yes. For the clearest result, format both with the JSON Formatter using Sort keys first, so only real differences show up rather than changes in key order.
What is a .patch file for?
It records the changes in unified diff format. You can apply it to the original file with git apply or the patch command, or attach it to a code review.
Written by Dewan Razib