QiLing Tools

🔀JSON Diff - Compare Two JSON Documents Online and Generate JSON Patch

A plain text diff flags every change in key order or indentation, which is mostly noise for JSON. This tool parses both documents and compares them structurally: object key order is always ignored, 1 and 1.0 are equal, and only real content changes are reported. Arrays are compared in order by default and aligned with a longest-common-subsequence match, so inserting one element does not mark everything after it as changed; tick Ignore array order to compare arrays as multisets and see only added or removed elements. View the result three ways: a diff tree showing changed paths in context, a change list with $.a.b[0]-style paths plus old and new values and one-click path copying, or an RFC 6902 JSON Patch of add / remove / replace operations that turns the left document into the right one when applied in order. Great for API responses, config files, database exports and test snapshots.

Free · No sign-up · Runs in your browserLast updated:

Loading tool...

How to use JSON Diff

  1. 1Paste the old JSON on the left and the new JSON on the right
  2. 2Optionally tick Ignore array order
  3. 3Review the diff tree, change list or JSON Patch and copy paths or the patch

FAQ

How is this different from a text diff?
A text diff compares characters line by line, so different key order, indentation or spacing all show up as changes. JSON diff parses first and compares structure: {"a":1,"b":2} and {"b":2,"a":1} are identical, and only changed values and added or removed keys are listed.
When should I ignore array order?
When an array represents an unordered collection — tags, permissions, or records returned in no guaranteed order. With the option on, [1,2,3] and [3,1,2] are equal and only extra or missing elements are reported. Leave it off when order matters, such as a list of steps.
What is JSON Patch and how do I use it?
JSON Patch (RFC 6902) is a standard format for describing changes to a JSON document as add, remove and replace operations addressed with JSON Pointer paths like /servers/0/port. Libraries in most languages can apply it, and it is common in HTTP PATCH APIs. Applying the generated patch in order to the left document produces the right one.
Is my data uploaded?
No. Parsing and comparison run entirely in your browser, so API payloads and configuration secrets never leave your computer.