Diff Checker
Free online diff checker. Compare two texts line by line in your browser, see exactly what was added, removed or changed, and copy the result as a unified patch.
What a diff checker does
A diff checker lines up two versions of a text and marks what changed between them. Lines that appear in both are left alone; lines that only exist in the first version are marked as removed, and lines that only exist in the second are marked as added. The result is a short list of changes instead of two long files you have to read side by side yourself.
When you need one
Whenever two things should be the same and one of them is not: a configuration file that works on one server and fails on another, a contract clause someone edited without telling you, a log that used to be clean, a translation that drifted from the original. Reading both versions in full is slow and unreliable — the eye skips a changed digit. A diff does not skip it.
Reading the result
| Symbol | Meaning |
|---|---|
| The line is the same in both texts and is shown only for context. | |
| - | The line exists only in the original text. |
| + | The line exists only in the changed text. |
| @@ | Starts a block of changes and gives the line numbers it covers in each text. |
These are the symbols of the unified format, the same one used by diff -u, git and patch. The patch this page produces can be saved to a file and applied with those tools.
How to use it
The comparison runs in your browser. Nothing you paste is sent anywhere, which matters because the files people compare tend to be exactly the ones they should not upload: credentials, contracts, customer data.
- Paste the original version in the first box and the changed version in the second.
- Choose whether to ignore case and whitespace — useful when the two files were written by different editors.
- Read the marked lines, or copy the unified patch to apply the change elsewhere.
Frequently asked questions
Is my text uploaded to a server?
No. The comparison happens entirely in your browser, in JavaScript. The page sends nothing and keeps nothing.
Why does it say a line changed when I only added a space?
Because by default the comparison is exact. Turn on "Ignore whitespace" and lines that differ only in indentation or spacing will be treated as equal — the display still shows each file as it really is.
Can I compare files instead of pasting text?
Open the file in any editor, select all and paste it here. The page compares text, so anything you can read as text can be compared: code, CSV, logs, JSON, plain prose.
Are Windows and Unix line endings a problem?
No. A CRLF line ending and an LF line ending are treated as the same break, so a file saved on Windows does not show up as if every line had changed.
What is the patch for?
It is the unified format that diff -u produces and that git and patch read. Save it to a file and you can apply exactly this change to another copy of the original, or attach it to a ticket so someone else can see what you changed.
Wikipedia — diff
Wikipedia — Unified format
Wikipedia — Longest common subsequence
Wikipedia — Patch (computing)
Wikipedia — File comparison