JSON Diff

Compare two JSON documents and focus on the changes that matter.

Calculation and conversion of the text and files you enter happen in your browser, and the tool does not send your original input or results to a server. For traffic related to visit statistics and ads, see the privacy policy.

How to use it

  1. Paste valid JSON on the left and right, or drop a local file into each labeled box. The left document is the starting point.
  2. Open comparison options to ignore volatile paths or match object arrays using a key such as id. Changes update automatically.
  3. Inspect added, removed and changed paths. Use the side-by-side tab to see highlighted values in sorted, indented JSON.
  4. Save the complete change list as CSV or download a JSON Patch. Copy either sorted document using its own button.

Examples

Ignore timestamps, keep price changes

With $.meta.updatedAt ignored, a price change is still reported. For the documents below the summary is added 0, removed 0, changed 1.

Input
{"price":10,"meta":{"updatedAt":"old"}} → {"price":12,"meta":{"updatedAt":"new"}}
Result
$.price: 10 → 12

Array matching without reorder noise

Compare [{"id":1},{"id":2}] with [{"id":2},{"id":1}]. Index mode reports two changed IDs; key mode using id reports no differences. The exact JSON Patch still reproduces the right-hand order.

Details

This tool compares JSON structure rather than lines of raw text. Whitespace outside strings does not count as a change. By default, object member order is ignored, arrays are compared by index, and equivalent number spellings such as 1, 1.0 and 1e0 compare equally. Disable numeric equivalence to inspect number spelling. Numbers are retained as decimal text, so large integers are not silently rounded. A changed type, including a number becoming a string, is one changed value. Adding or removing an entire subtree counts once at its root; null and a missing member remain distinct.

Ignore rules match a small, explicit path language. A matched node and its descendants disappear from the comparison, but remain in copied JSON and in the exact patch. Key matching applies to every compared array, requires unique string or numeric identifiers, and does not guess a fallback for missing IDs. String value case folding uses Unicode lowercase conversion, not locale-sensitive collation or normalization. Object member names remain case sensitive. Disabling key-order ignoring reports a reordered object as one change at that object.

JSON Patch uses RFC 6902 add, remove and replace operations and RFC 6901 pointer escaping. Operations apply from left to right; array removals run from the highest index downward. This export always includes original differences even when the comparison hides them. It preserves JSON values and array order, not whitespace or object member order. CSV contains the complete displayed comparison, independent of the table filter. Its values are JSON-encoded; missing values use a separate marker.

Processing runs in a disposable background worker. Each input is limited to 5 MiB of UTF-8, 128 nesting levels and 150,000 values; numbers may contain at most 1,024 characters. At most 100,000 comparison changes or patch operations are supported. Duplicate object member names are rejected. The table pages 100 changes at a time; long cells and the 600-line preview are shortened for responsiveness, while exports and copies retain complete values. No input is uploaded, placed in URLs, logged or saved to browser storage.

Frequently asked questions

Why can the patch contain changes when the summary says zero?

Comparison options can hide differences. The patch deliberately uses both originals so applying it produces the right-hand document, including ignored paths and reordered arrays.

Can I use a full JSONPath expression?

No. Use $, simple .member names, numeric [0] indices and array [*] wildcards, one path per line. Quoted property names, recursive descent and expressions are not supported.

What happens when array IDs are missing or duplicated?

Key mode reports an error at the array or item. Choose a unique string or number key, or switch to index mode. A number ID 1 and string ID "1" are distinct.

Are my files uploaded or remembered?

No. File reading and comparison happen locally in browser memory. There are no ads or analytics on this tool. Downloads and clipboard copies happen only when you press their buttons.