Browser tool Runs locally
JSON Diff / Compare
Compare two JSON documents and see exactly what changed. Runs locally in your browser.
JSON A · Original / before
0 chars⌘/Ctrl + Enter to compare
JSON B · Modified / after
0 chars⌘/Ctrl + Enter to compare
Comparison result
Paste JSON in both panels and click Compare JSON.
What is JSON diff?
JSON diff compares two JSON documents structurally - value by value, key by key - and reports what was added, removed, or changed between them. Unlike a plain text diff, it understands JSON's structure, so it isn't thrown off by reordered keys or different indentation.
How to compare two JSON documents
- Paste the original in JSON A.
- Paste the modified in JSON B.
- Click Compare JSON.
- Review the result.
Practical examples
- Comparing two versions of an API response to see exactly which fields changed after a backend update.
- Checking a configuration file against a known-good baseline before deploying it.
- Reviewing what a script or migration changed in a JSON data file.
- Debugging a failing test by comparing the expected JSON fixture against the actual output.
Common mistakes and edge cases
- Expecting an array diff to align items by value rather than position - inserting an item shifts every later index, which shows up as a cascade of changes rather than a single insertion.
- Comparing JSON with different key ordering and expecting no differences to register elsewhere - key order itself is ignored, but this can mask the fact that two "equal-looking" objects were built differently.
- Pasting invalid JSON into either field - both documents must parse successfully before they can be compared, so fix any syntax errors first (a JSON validator can help pinpoint them).
Frequently asked questions
- Does the comparison care about formatting or key order?
- No. The comparison is structural, not textual - it parses both documents and compares their actual values. Whitespace, indentation, and the order of keys within an object don't affect the result, since JSON objects are unordered by definition.
- How are arrays compared?
- Arrays are compared by index - the item at position 0 in JSON A is compared to the item at position 0 in JSON B, and so on. This means inserting or removing an item in the middle of an array will show every item after it as changed, since their positions shifted, even if the values themselves didn't.
- Is my JSON uploaded to a server?
- No. Both documents are parsed and compared entirely in your browser using JavaScript - nothing is sent over the network, which makes it safe to compare sensitive configuration files or API responses.
- Can I compare very large JSON files?
- Yes, though very large or deeply nested documents (tens of thousands of keys) may take longer to parse and render, since the comparison happens in your browser rather than on a server. For typical API responses and config files, it's effectively instant.
- Does the diff detect type changes, like a number becoming a string?
- Yes. If a value's type changes - for example "count": 5 becomes "count": "5" - that's reported as a change even though the values might look similar, because JSON treats them as distinct types.
Related tools
JSON Formatter
Format, beautify, and validate JSON.
JSON Validator
Check whether JSON is syntactically valid.
JSON Viewer
Explore JSON as a collapsible tree.
JSON Minifier
Produce compact single-line JSON.
JSON to CSV
Convert an array of JSON objects into CSV.
CSV to JSON
Convert CSV back into JSON.
JSON to YAML
Convert JSON into readable YAML.
YAML to JSON
Convert YAML back to JSON.
JSON Escape / Unescape
Escape text into a JSON string literal.