Skip to content
XUtilHub

Compare JSON Online – JSON Diff Tool

Compare two JSON documents and see added, removed and changed values with their paths. Key order is ignored. Free online JSON diff.

  • Free, no sign-up
  • Runs in your browser, nothing uploaded
Original
Modified
3 differences0 added0 removed3 changed
PathChangeOriginalModified
$.roles[1]changed"editor""owner"
$.address.citychanged"London""Cambridge"
$.lastLoginchangednull"2026-10-01"

About the JSON Compare

Paste two JSON documents to see exactly what differs. Every added, removed and changed value is listed with its path, and key order doesn't matter.

Key features

  • Structural diff: compares data, not text
  • Key order is ignored automatically
  • Lists every added, removed and changed value
  • Shows the exact JSONPath of each difference
  • Side-by-side original and modified values
  • Both documents stay in your browser

What is JSON Compare?

JSON Compare is a structural diff for JSON. Instead of comparing two blocks of text line by line, it parses both documents and walks through them value by value. You get a clear list of what was added, removed or changed, each with the JSONPath where it happened.

That means formatting differences, indentation and the order of keys inside objects are ignored. Two documents that contain the same data are reported as identical, however differently they're written.

Example

Original

{ "name": "Ada", "role": "editor", "city": "London" }

Modified

{ "city": "Cambridge", "name": "Ada", "role": "owner", "team": "core" }

Result

PathChangeOriginalModified
$.rolechanged"editor""owner"
$.citychanged"London""Cambridge"
$.teamadded"core"

Notice that the different key order made no difference.

When to compare JSON

  • API regression testing. Compare responses before and after a deployment.
  • Config drift. Spot differences between staging and production settings.
  • Debugging. Find out exactly what a request changed in a stored record.
  • Data migration. Verify that transformed records still contain the expected values.
  • Code review. Understand changes to large fixtures or snapshot files.

Understanding the change types

  • added: the path exists only in the modified document.
  • removed: the path exists only in the original document.
  • changed: the path exists in both but the value or type differs.

When a whole object is added or removed, it's reported once at its own path rather than once per nested field, which keeps the list short.

Tips for cleaner diffs

  1. Remove noise first. Volatile fields such as timestamps or request IDs always differ. Delete them, or run both sides through the JSON Cleaner.
  2. Watch array order. If arrays contain the same items in a different order, sort them in your code before comparing.
  3. Check types. "42" vs 42 is a genuine difference that often causes bugs.

View either document as a tree in the JSON Viewer, or sort keys for a readable text diff with the JSON Sorter.

How to use the JSON Compare

  1. Paste your data into the input box, upload a file, or click Sample to try it out.
  2. Adjust the options above the editor if you need to (indentation, delimiter, and so on).
  3. The result appears instantly in the output panel. Any errors are shown with their line and column.
  4. Click Copy to copy the result, or Download to save it as a file.

Frequently asked questions

Why use a JSON diff instead of a normal text diff?

Text diffs flag differences in whitespace, indentation and key order even when the data is identical. A structural JSON diff parses both documents and compares values, so it reports only real changes.

How are arrays compared?

Arrays are compared position by position: element 0 with element 0, and so on. If an item is inserted at the start, later items will show as changed because their positions shifted.

Does 1 equal 1.0 or "1"?

1 and 1.0 are the same JSON number and are treated as equal. The string "1" is a different type, so it's reported as a change.

Can I compare very large files?

Yes. Comparison is fast for documents of several megabytes. The results table shows every difference with its path.

Is my JSON uploaded to a server?

No. All JSON tools run entirely in your browser, so your data never leaves your device.

Is there a size limit?

There is no fixed limit. Files of several megabytes work fine; very large files depend on your device's memory.

Do I need an account?

No. Every JSON tool is free and works without signing up.

Last updated:

Related JSON tools