Differences

View
Mark changes in

Type, paste or open the two texts to compare them.

How do I compare two texts?

Compare two texts or files and see every added, removed and changed line, with changed words marked. Free and private: nothing leaves your browser.

Paste or open the original in the first box and the changed version in the second. The differences appear below at once: lines marked + were added, − removed and ~ changed, with the changed words marked within each line. Long stretches of unchanged lines are folded; Previous change and Next change step through the rest.

Can I ignore whitespace, case or line endings?

Yes. Ignore whitespace treats x = 1 and x  =  1 as the same, and Ignore case does the same for capitals. Files from Windows end their lines differently from files from macOS and Linux; the page says when the two texts differ in that way, and Ignore line endings compares only the text. Ignored differences still show in the lines, they are just not marked as changes.

How do I compare two JSON files?

Tick Compare as JSON. Both are formatted the same way first, with the keys in alphabetical order, so a different key order or layout never shows as a change, only real differences in the data. Numbers are compared exactly as written, so 9007199254740993 and 9007199254740992 differ, as they should, though many JavaScript tools would call them equal.

What is a unified diff?

The standard format for a set of changes, as written by diff -u and git diff. Copy it to paste into a code review or a bug report, or download the .patch file and apply it with git apply changes.patch or patch -p0 < changes.patch.

Is it safe for configuration files and logs?

Many diff sites save what you compare on their servers so that it can be shared. Here, both texts stay on this page: nothing is sent anywhere or saved, even with Remember settings ticked, which keeps only the view and options. Files up to 5 MB each can be compared; large ones are compared in the background so the page stays responsive.