JSON Compare

Compare two JSON documents semantically — skip keys, optional array sorting, JSON paths, and side-by-side mismatch diffs. Runs entirely in your browser.

jsondiffcomparedeveloper

Category: Code & Developer Tools

All parsing, normalization, and comparison run in your browser. Nothing is uploaded to a server; pasted JSON and files stay on your device.

Click Compare to see structured differences, matched subtrees, and normalized output.

What is semantic JSON compare?

Semantic JSON compare parses both documents into data structures, optionally removes keys you choose (at any depth), normalizes object key order, and optionally sorts array elements using a stable signature so you can treat arrays as order-insensitive sets. The tool then walks both trees and reports matched equal subtrees plus structured mismatches (type, value, length, missing index, or keys only on one side). This is different from a plain text diff: reordering keys or array elements does not create false positives when normalization matches your intent.

JSON Compare vs text diff

A line-by-line text diff (like our Text Diff tool) highlights insertions and deletions in the raw file. That is ideal for code and logs. JSON Compare is for when you care about data equivalence: same object keys and values after normalization, same array membership when sorting is enabled, and human-readable paths such as $.items[0].id plus RFC 6901 JSON Pointers for automation.

How to use this tool

  1. Paste JSON A and JSON B (or load .json files from disk).
  2. Optionally list comma-separated key names to strip before comparing (for example timestamps or ids).
  3. Toggle “Sort array elements” depending on whether array order should matter.
  4. Click Compare to see mismatch cards, a matched-subtrees table, and full normalized JSON.
  5. Use Copy mismatch paths or Download report for CI notes and debugging.

Privacy

Everything runs locally in your browser. Your JSON is not sent to Dynamic Duniya servers or third parties. The download report is built as a file on your device using a Blob URL.

Frequently Asked Questions

What does “sort array elements” do?

When enabled, each array is recursively normalized, then elements are sorted by a deterministic stable stringify signature so two arrays with the same elements in different orders compare equal. When disabled, array order follows your JSON as normalized (keys sorted inside objects, but array indices stay in file order).

What is a JSON Pointer?

JSON Pointer (RFC 6901) is a string path starting with /, with segments separated by slashes. Tilde escapes represent ~ and / inside keys. This tool shows pointers next to JSONPath-style paths for easy copy into APIs and tests.

Why do I see a “truncated” message?

Very deep trees or an extremely large number of mismatches can freeze the browser. The engine stops collecting after internal limits and marks the report as truncated; download the partial JSON report if you need to archive what was found.

Is JSON Compare free?

Yes. No account is required.

Tips

Quick guidance for using our tools safely and effectively.

Privacy

Files are processed on the server for conversion only and are not used for training or shared with third parties.

Best results

Use the formats suggested in each tool. Large media files may take longer — keep the tab open until processing finishes.

Need something else?

Browse related tools below or explore other categories from the main Dev Tools hub.