RunLocalTools

JSON Diff

Paste two JSON documents and see exactly what changed — structurally, not line-by-line — so a reordered object or reformatted whitespace doesn’t get flagged as a change when the actual data is identical.

Why a text diff isn’t good enough for JSON

A standard line-based diff tool compares text as text, which means two JSON documents holding the exact same data can show up as completely different if one has 2-space indentation and the other has 4-space, or if object keys happen to be in a different order (which is semantically irrelevant in JSON — key order isn’t meaningful the way array order is). This tool parses both documents as actual data structures first, then compares the resulting values, so you see only the differences that actually matter: a field that’s missing, a value that changed, an array item that was added or removed.

How to use it

  1. Paste your original JSON into the left panel and the modified version into the right panel.
  2. The tool parses both and shows a structural diff — added fields highlighted in one color, removed fields in another, and changed values showing both the old and new value side by side.
  3. Nested objects and arrays are diffed recursively, so a change buried five levels deep in a large payload is still surfaced clearly rather than requiring you to expand and manually compare each level.
  4. Toggle “ignore array order” if you’re comparing data where array item order isn’t meaningful to your use case (like a list of tags), versus leaving it on when order does matter (like a list of ordered steps).
  5. A summary count at the top shows the total number of additions, deletions, and modifications at a glance before you scroll through the detail.
  6. Export the diff as a readable report, useful for documenting exactly what changed between two versions of an API response or config file during a code review or bug investigation.

Common situations this solves

  • Comparing two versions of an API response to understand exactly what a backend change altered, without formatting differences creating false positives.
  • Debugging why a test is failing when comparing expected versus actual JSON output, especially when the difference is subtle (a number 5 versus the string "5", which look identical when skimmed but are structurally different types).
  • Reviewing changes to a JSON configuration file before deploying, to confirm only the intended fields were modified.
  • Auditing two exports of the same data taken at different times, to see what changed between snapshots.
  • Verifying a data migration or transformation script worked correctly by diffing the input and expected output structures.

Frequently asked questions

How is this different from just pasting both files into a regular text diff tool?

A text diff compares raw characters and lines, so whitespace, indentation style, and key order all show up as “changes” even when the underlying data is identical — which buries the differences that actually matter under formatting noise. A structural JSON diff parses the data first and only reports differences in actual values and structure, ignoring how the JSON happens to be formatted.

Does this tool catch type differences, like a number versus a string with the same-looking value?

Yes — "age": 30and "age": "30" are flagged as a change even though they’d look identical if you were just eyeballing the text, because JSON treats numbers and strings as genuinely different types, and this distinction frequently causes real bugs in strongly-typed consuming code.

What happens if one of the two JSON documents I paste is invalid?

The tool will point out the specific parsing error and its location, the same way the JSON formatter does, since a structural diff can’t run until both inputs are confirmed to be valid JSON. Fix the syntax error first, or use the JSON formatter’s auto-repair option if the issue is something minor like a trailing comma.

Can I compare two large, deeply nested JSON files, like full API responses with hundreds of fields?

Yes, the diff engine handles arbitrarily deep nesting and large documents, though for very large files with many changes, using the summary count and expand/collapse controls on unchanged sections keeps the output manageable rather than scrolling through pages of unrelated context.

Does “ignore array order” also ignore duplicate or missing items, or only their position?

It specifically ignores position — an item that exists in both arrays but at a different index won’t be flagged as changed, but an item that’s genuinely missing from one array, or appears an extra time in one versus the other, will still be correctly reported as an addition or removal.

Need JSON Formatter/Validator? Check this Out!