How to compare two files
- Paste or drop the original text on the left and the new version on the right.
- Press Compare. Removed lines are red, added lines green; changed words inside a line are marked more strongly.
- Switch between side by side and unified, and use Ignore whitespace to hide re-indentation noise.
- Download the result as a unified
.patch that git apply and patch understand.
Comparing JSON or code that was formatted differently
If two files differ only in formatting, every line shows as changed. The code diff checker does this for you: it formats both sides with the same rules before comparing. For JSON data, JSON compare also ignores key order. Only the real changes remain.
Questions
Is the text I compare uploaded?
No. The diff is calculated in your browser with the open-source jsdiff library, which implements the Myers diff algorithm also used by Git.
Can I compare two files?
Yes — drop a file onto either side, or use the Open file buttons. Any text file works: code, CSV, logs, configs.
How do I compare two JSON files?
Use JSON compare: it ignores key order and formatting and lists each changed path.
Can I share a comparison?
The comparison never leaves your browser, so there is no share link. Download the .patch file and send that instead — anyone can apply it with git apply.
What is the difference between text compare and code diff?
Both compare line by line. For source code that may be indented or wrapped differently, the code diff checker formats both sides first so only real edits show.
How do I see only the lines that changed?
Tick Only changes. Unchanged runs are folded down to three lines of context around each change, like git diff.