How it works
Differ parses both JSON documents, sorts object keys and pretty-prints them before comparing, so reformatted or reordered JSON is reported as identical. Large integers keep full precision (no rounding past 2^53), and invalid JSON is reported with its line and column.
Everything runs locally in your browser. Your text is never uploaded to a server.
Features
- JSON diff: object keys are sorted and formatting is normalised, and big integers keep full precision. You can also ignore array order.
- XML diff: attributes are sorted, and whitespace, comments and the XML declaration are ignored. You can also ignore element order.
- Properties diff: Java
.propertiesfiles are parsed and their keys sorted, whichever separator is used. - Text diff: changes are shown line by line, with word-level highlighting. You can ignore whitespace, case and CRLF/LF line endings.
- Side-by-side or unified view, with the option to show the full file or only the changed lines.
- Open or drag and drop files, swap the two sides, and share a link to the comparison, download a standalone HTML report, or copy/download a
.diffpatch. - Auto-detects the format, shows parse errors with line numbers, and has a dark mode and a mobile layout.
Frequently asked questions
Is my data uploaded anywhere?
No. Parsing and comparison happen entirely in your browser with JavaScript. Pasted text stays in your tab and is cleared when you close it.
How do I compare JSON and ignore key order?
Choose JSON (or leave it on Auto) and keep Ignore key order ticked. Both documents are sorted and pretty-printed, so only real value changes are highlighted.
Why does my diff show every line as changed?
This is usually caused by Windows (CRLF) and Unix (LF) line endings. Differ ignores line endings by default. If you're comparing plain text, you can also tick Ignore whitespace.
Can I compare XML files where elements are in a different order?
Yes. In XML mode, tick Ignore array order and child elements will be sorted before comparing.
How do I share a diff with someone?
Click Share link. The link holds both texts in compressed form after the #, so nothing is stored on a server. Anyone with the link can open the same comparison. For very large files, use Download report to get a single HTML file you can attach to an email or ticket.
Can I save the result?
Use Copy patch or Download .diff to get a standard unified diff that works with git apply and patch.