Diff Checker
Paste two versions of a file and see exactly what changed — added lines in green, removed lines in red. Everything runs locally in your browser.
What Is a Diff?
A diff is a line-by-line comparison between two versions of a text file. The name comes from the classic Unix diff utility, and the concept is at the heart of every version control system — Git's git diff, GitHub pull requests, and code reviews all display changes as diffs. Being able to read a diff quickly is one of the most practical skills a developer can build.
Common Uses
- Reviewing config changes — compare
nginx.conf,.env, or Docker Compose files before and after an edit. - Checking merge conflicts — paste the two conflicting versions to see exactly which lines differ.
- Verifying generated output — confirm a formatter or transpiler only changed what it should have.
- Debugging data exports — spot the row that changed between two CSV dumps.
How the Comparison Works
The tool splits both inputs into lines and finds the longest common subsequence (LCS) between them. Lines present in both versions are shown as context, lines only in the "Original" box are marked as removed, and lines only in the "Changed" box are marked as added. This is the same core algorithm behind the GNU diff tool, scaled down to run entirely in your browser — your text never leaves your device.
FAQ
- Q: Does this tool upload my code anywhere?
- No. All comparison happens locally in your browser with JavaScript — nothing is sent to a server. This makes it safe to paste proprietary source code or confidential configs.
- Q: Can it compare binary files or images?
- No — this tool works with text only. For binaries, use a dedicated binary diff tool or compare file hashes (e.g.
md5orsha256) to detect changes. - Q: How large can the inputs be?
- The comparison handles typical source files (up to a few thousand lines) instantly. Extremely large files may slow down the in-browser algorithm — for those, the command-line
difforgit diff --no-indexis a better fit.
Why Use Our Diff Checker?
No signup, no file uploads, no server round-trips. Paste, compare, and copy the result — the color-coded output makes it obvious what changed at a glance, and the diff summary tells you how many lines were added and removed before you even scroll.