JSON Compare: Two JSON Documents, One Structural Answer

Paste two JSON files or snippets and see exactly what changed: keys, values, types, array order. A diff that understands JSON, not just text. Nothing leaves your browser.

JSON Compare Tool

Built for comparing API responses, config files, and generated JSON. Structural diff with path notation, array set mode, and RFC 6902 patch output. Fully client-side.

Arrays:

In set mode, array elements match by content, not position: paths refer to the left document and added elements are appended. Need to reformat first? Open the JSON Formatter. Comparing plain text instead? Use the Text Diff Checker.

How to use:

  1. Paste JSON A (the original) on the left and JSON B (the changed version) on the right, or drop two files onto the boxes
  2. Both sides parse instantly: a broken side reports the line and the reason, and no diff runs until both sides parse
  3. Read the tree: added, removed and changed entries carry their path (like user.tags[2]); click an unchanged line to expand the subtree
  4. Switch arrays to set mode when order does not matter, and turn on the formatting note when the texts differ but the structure matches
  5. View the RFC 6902 JSON Patch in the panel below the diff and copy it, or grab a ready-to-run apply snippet for JavaScript, Python and more; the plain list stays for people

Everything runs in your browser: no network calls, no analytics on your input, nothing stored.

You can also compare two JSON objects or files online the same way: paste the file contents on both sides and the structural differences are listed with their paths.

Frequently Asked Questions

Is my JSON uploaded anywhere?

No. The comparison runs entirely in your browser: no network calls, nothing stored, no analytics on your input. Close the tab and both documents are gone.

What is a structural JSON diff?

It compares the parsed documents, not the raw text. Keys are matched by name, so formatting, indentation and key order never show up as changes. You see keys that were added or removed, values that changed, and types that switched, each with its path like user.tags[2].

How does array set mode work?

By default arrays compare index by index, so a shuffled order shows as many changes. Set mode matches array elements by content instead: two lists with the same elements in a different order produce no diff. Additions and removals show normally, and an edited element appears as a removal plus an addition. Paths in set mode refer to the left document and added elements are noted as appended.

What is the JSON Patch panel for?

View JSON Patch shows the full RFC 6902 patch (add, remove, replace) with JSON Pointer paths in a panel below the diff, together with copy-paste-ready snippets for applying it in JavaScript, Python, Go, Java and C#. Copy any tab into a script or CI job. The plain list says the same thing in one readable line per change.

How is this different from a text diff?

A text diff compares characters and flags whitespace or re-indentation as changes. JSON Compare parses both documents first and diffs the structure, so only real key, value and type changes appear. For plain text or code, use the Text Diff Checker.