Semantic diff

0 differences

No structural differences found.

JSON Patch (RFC 6902)

A JSON Patch is a small, standard recipe (RFC 6902) that lists the exact steps — add, remove, and replace — needed to turn the Left (original) document into the Right (modified) one. Copy it and apply it with any RFC 6902 library (for example fast-json-patch in JavaScript or jsonpatch in Python) to update a document programmatically, or send just these changes to an API instead of the whole file.

The documents are structurally equivalent — the patch is empty.

JSON Diff Online — Compare Two JSON Files

JSONLab JSON Diff is a free, browser-based JSON diff tool that compares two documents and turns complex changes into a clear side-by-side result. Paste an original JSON document on the left and an updated version on the right to find additions, removals and changed values in seconds. This online JSON diff focuses on the actual data structure, not visual formatting, so it is useful for reviewing API responses, configuration files, test fixtures and saved application state.

Find meaningful changes with a semantic JSON compare

An ordinary text comparator treats every space, line break and moved key as a change. A semantic JSON diff first parses both documents, then compares their objects, arrays and primitive values. Reformatting a file or changing the order of keys inside an object therefore does not produce noise. Array positions remain meaningful, while real type and value changes are reported at their exact JSON paths. The result is a more accurate semantic JSON compare for structured data.

The JSON diff viewer groups every JSON difference so you can move through nested changes without manually scanning two long files. Added, removed and modified values are easy to distinguish, and the original values remain visible for context. Use it as a quick JSON diff finder during code review or as a final JSON diff check before an API, migration or configuration change is shipped.

How to diff two JSON files online

You do not need to install a package or upload either file. Complete a JSON diff online in four steps:

  1. Open both local JSON files and copy the original into the left editor.
  2. Paste the revised document into the right editor.
  3. Select Compare to run the semantic comparison.
  4. Review each path, merge the changes you want, or export a JSON Patch.

Both documents must contain valid JSON. If one side has a missing quote, comma or bracket, open the JSON Viewer and Validator to locate and repair the syntax first, then return to the comparison.

A JSON difference checker for development workflows

This JSON diff checker helps developers verify payloads from two environments, inspect an API contract change, compare package configuration, review test snapshots and troubleshoot unexpected data. Unlike a raw line diff, the JSON difference checker directs you to the property path that changed. You can merge selected edits left-to-right or right-to-left, perform a three-way merge against a common base, and export an RFC 6902 patch for automation. The resulting patch is easy to review, store with a ticket, and replay in another environment when the same update must be applied consistently. If formatting and line-level edits are the changes you need to preserve, use the dedicated Text Compare tool instead.

Python JSON diff workflows

For a Python JSON diff, load each file with Python’s built-in json module and compare the decoded values rather than their raw text. This ignores object key order in the same way as a semantic comparison:

import json

with open("before.json") as before, open("after.json") as after:
    is_equal = json.load(before) == json.load(after)

print(is_equal)

Python can confirm equality, while this visual JSON diff tool explains where the documents differ and can generate patch operations. That makes it a practical companion to a repeatable JSON diff Python test or CI workflow.

Private JSON diff online with no document uploads

Although this is a JSON diff checker online, the comparison runs locally in your browser. Your documents are not sent to an application server, and no account is required. You can safely keep the entire review in one tab, clear the editors when finished, and use the tool again whenever you need to find a JSON difference online. JSONLab is free, responsive and designed to make structured changes understandable without adding another dependency to your project.

Frequently asked questions about JSON diff

How to diff two JSON files?

Open both files locally, copy the first document into the left editor and the second into the right editor, then select Compare. JSONLab parses both files and highlights added, removed and changed values by their JSON path. You can then inspect each difference, merge selected changes or export the result as an RFC 6902 JSON Patch.

How to diff JSON files?

Use a semantic JSON diff rather than comparing the files as plain text. Paste the two JSON documents into this tool and run the comparison. Because both sides are parsed first, indentation, whitespace and object key order do not create false changes; the result shows differences in the underlying values and structure.

What is a semantic JSON diff?

A semantic JSON diff compares parsed objects, arrays and values instead of raw characters. It understands that { "a": 1, "b": 2 } and { "b": 2, "a": 1 } represent the same object. Genuine additions, removals, type changes and value changes are still reported with their precise paths.

Does JSON key order affect the comparison?

No. The order of keys inside a JSON object does not affect this comparison, because key order does not change the object’s meaning. Array position can be meaningful, however, so reordered or changed array items may appear as differences.

Can I use this JSON diff checker online without uploading data?

Yes. JSONLab runs the comparison locally in your browser. Your JSON is not sent to an application server, which makes the tool suitable for private API responses, configuration files and test fixtures. You can also keep using the core comparison after the page has loaded without sending the documents elsewhere.

What changes does the JSON difference checker find?

The checker identifies properties and array items that were added or removed, values that changed, and type changes such as a number becoming a string. Each result includes a JSON path so you can locate the change in nested data and inspect the corresponding values side by side.

Can I merge changes or export a JSON Patch?

Yes. After comparing the documents, you can apply selected changes between the left and right versions or export a standard RFC 6902 JSON Patch for use in an API, test or automated workflow. The tool also supports three-way merge when you need to compare left and right changes against a common base.

How do I run a JSON diff in Python?

Load both files with Python’s built-in json module and compare the decoded values to test semantic equality. For a detailed visual review, paste those values into JSONLab to see paths, changed values and patch operations. This combines a repeatable Python JSON diff check with an easy side-by-side viewer.