Online Diff Checker
Compare two texts, visualize differences, and merge changes
Tip: Compare texts, then click on the arrows to choose which version to keep for each difference.
Runs in your browserOriginal Text
Modified Text
Compare two texts and see what changed
Compare text online in two steps: paste the original on the left and the new version on the right, or load each from a file, then press Compare. The diff checker lines both texts up side by side, with line numbers, and colors what was removed, added or changed. Inside a changed line only the words that differ are highlighted, so a new port number in a code diff or a fixed typo in a text compare stands out at once.
It then works as a merge tool too: for every difference you pick the left or the right version and get the merged text to copy or download. Everything runs in your browser, so config files and private code stay on your device.
What a comparison shows
Two versions of a small config file:
port: 8080
host: localhost
debug: true
timeout: 30
port: 8080
host: 0.0.0.0
timeout: 60
retries: 3
| Line | Shown as | Why |
|---|---|---|
port: 8080 |
Unchanged | Same in both |
host: line |
Changed, with localhost and 0.0.0.0 highlighted | Same key, new value |
debug: true |
Removed | Only in the original |
timeout: line |
Changed, with 30 and 60 highlighted | Same key, new value |
retries: 3 |
Added | Only in the modified text |
Lines are matched with Myers' algorithm, the one git diff uses by default, so moved and inserted blocks line up instead of turning every following line red. A removed and an added line count as one changed line only when at least half of their words match; otherwise they stay a separate removal and addition.
Merge the two versions
Each difference gets two arrows. Until you pick one, the merged result follows these defaults:
| Difference | Merged result by default | Left arrow |
|---|---|---|
| Removed line | Left out | Kept |
| Added line | Kept | Left out |
| Changed line | Both versions between <<<<<<< LEFT and >>>>>>> RIGHT markers |
The original line |
Copy and Download stay disabled while a changed line is unresolved, so a file with conflict markers never leaves the tool by accident. All Left and All Right settle every difference in one click, and the counters show how many changes are resolved and how many are pending. The download is a plain .txt file.
Lines that look the same but differ
-
Spaces and indentation
A trailing space, a tab instead of spaces or a re-indented block makes a line different. Turn on Ignore whitespace to compare lines trimmed, with runs of spaces counted as one; the merged result then keeps the original's spacing for those lines.
-
Windows and Unix line endings
A file saved on Windows ends its lines with CRLF, one from macOS or Linux with LF. The checker treats both as the same line ending, so a file copied between systems doesn't show every line as changed.
-
JSON on one line
Two minified JSON responses are each a single line, so any change marks the whole line. Run both through the JSON beautifier first to compare them key by key.
Diff checker questions
Yes. The upload button above each side loads a text file into it: .txt, .js, .css, .html, .json, .xml, .md and .py are offered in the file picker. Word documents and PDFs are not text files, so copy their text in instead.
Yes. Hello and hello are different lines; there is no option to ignore case.
There is no upload limit, since nothing is uploaded. Two texts that differ in more than 2,000 lines are no longer aligned line by line: everything between the first and the last difference is shown as removed and added.
No. It compares two texts you provide line by line; it doesn't search the web or other documents for copied passages.
No. The comparison and the merge run in your browser, and uploaded files are read locally.