JSON Diff

Paste original and modified JSON to see structural changes (top-level keys, root arrays) and a formatted unified diff. Key order is ignored — objects are compared after sorting keys. Invalid JSON in either panel is reported before diffing.

  • Runs entirely in your browser
  • No data stored or sent to a server
  • Free forever — no signup
  • Instant conversion

Input and Output

Use the interactive encoder and decoder on this page to process your text.

Learn more about JSON diffs

How to Compare JSON Documents

JSON Diff

Structural vs Line Diff

This tool first parses both JSON documents, summarizes structural changes (top-level keys and array element values), then shows a pretty-printed unified line diff for full visibility. Paste original JSON in the first panel and modified JSON in the second.

Common Use Cases

  • Comparing API responses before and after a change
  • Reviewing config file edits
  • Debugging test fixture differences

Common Mistakes

  • Comparing minified vs formatted JSON and seeing whitespace-only diffs in the line view
  • Expecting array order changes to appear as structural changes when values are identical
  • Pasting invalid JSON in one panel — fix parse errors before diffing

Developer Tips

  • Sort keys on both documents first for cleaner line diffs
  • Use JSON Patch tool to generate machine-readable change operations
  • Focus on the structural summary for quick API regression review

Frequently asked questions

Does key order matter?

JSON is parsed before diffing, so key order in the input does not affect structural comparison. The line diff uses pretty-printed output.

What if one side has invalid JSON?

The tool reports a parse error for the invalid panel before running the diff.