JSON Diff
Compare two JSON documents online, ignoring key order and formatting. Keys are normalised and sorted, so only real changes in values are highlighted.
Runs in your browser · Nothing uploadedFree · No sign-up
Something not working, or missing a feature? Send feedback
About the JSON Diff
A plain text diff of JSON flags every reordered key. The JSON Diff parses both documents and compares them semantically, so only real differences in values, added keys and removed keys are shown.
Both versions are compared in your browser, so private code and documents never leave your device.
How to use the JSON Diff
- Paste the two JSON documents.
- Fix any syntax error that is reported.
- Review the highlighted value changes, additions and removals.
Example
Input
Original: {"name":"Ada","plan":"free","tags":["a","b"]}
Changed: {"tags":["a","b"],"plan":"pro","name":"Ada","seats":5}Result
- "plan": "free", + "plan": "pro", + "seats": 5,
The key order is different, but only the plan value and the new seats key are reported.
Common mistakes
- Array order counts. Arrays are ordered, so ["a", "b"] and ["b", "a"] are different. Sort arrays in your code before comparing if their order does not matter.
- Numbers and strings. 1 and "1" are different JSON values. A changed type is reported even when the text looks almost the same.
- Invalid input. Both sides must be valid JSON before they can be compared. Fix the reported error first, or use the text diff for fragments.
Works well with the JSON Diff
- Text & Code Diff: compare plain text, code or JSON fragments line by line.
- JSON Formatter: format and fix one side before comparing.
- JSON Viewer: look up where a changed key sits in a large document.
Frequently asked questions
Does key order matter?
No. Keys are normalised and sorted before comparing, because JSON objects are unordered.
Does array order matter?
Yes. Arrays are ordered in JSON, so moving an item is reported as a change.
How do I compare two API responses?
Paste the old response on the left and the new one on the right. Keys are sorted on both sides first, so only added, removed and changed values are highlighted.
Can I export the differences?
Yes. Copy the differences or download them as a unified diff file (changes.diff) to attach to a bug report or code review.
How do I compare two JSON files online?
Choose Open file above each panel, or drop both .json files on either panel: the first fills Original and the second fills Changed. Both files are read in your browser and never uploaded.
Guides and tutorials
- JSON & Data Formats
How to Compare Two JSON Files and Find the Real Differences
Why a text diff of JSON shows noise, how a semantic JSON diff ignores key order and formatting, and how to compare JSON in the browser, with jq and in Python.
· 5 min read
- Code Quality & Workflow
How to Read a Diff: The Unified Diff Format Explained
Understand every line of a unified diff: file headers, @@ hunk headers, context lines and + and - changes, plus git diff extras, patches and code reviews.
· 6 min read
Related tools
Text & Code Diff
Compare two texts or code files online side by side. Additions, deletions and modified lines are highlighted with inline word changes. Runs in your browser.
Compare Excel Files
Compare two Excel or CSV files online cell by cell. See changed values, added and removed rows and new columns, matched by ID or position. Nothing is uploaded.