JSON Diff
Compare two JSON documents.
This runs in your browser. Nothing is uploaded.
Drop a file here or choose oneChoose file
Drop a file here or choose oneChoose file
How the comparison works
Objects are compared by key names, not by the order those keys appear. Arrays are compared by index. A key only on the right is added. A key only on the left is removed. A different value or type at the same path is changed. This is not a merge tool. It lists differences. It does not rewrite either file.
Pretty-print on the JSON Formatter if you want matching whitespace first. Use JSON to CSV when the next step is a spreadsheet.
Objects, keys, and arrays
Object key order is ignored because the comparison works on parsed values. A reordered object is not reported as changed when its keys and values are the same. This is useful when two API responses were serialized by different runtimes. The path in each result points to the key or array position where the values differ.
Arrays are compared by index by default, so inserting one item at the start can make later positions look changed. Turn on Ignore array order to compare arrays as unordered bags of values. The tool does not guess that two similar objects moved.
What JSON Diff does not do
This page is a comparison view, not a merge editor. It does not choose which value should win, generate a patch, or rewrite either input. It also does not validate an API schema or prove that two documents are interchangeable. A value can be equal while its business meaning is wrong. Review the path and the surrounding object before applying a change.
Both documents are parsed and compared locally. Invalid input is reported for the left side, the right side, or both, with a line and column when available. No request is made with your JSON. The guide How to format and validate JSONcovers a useful format, compare, and review sequence.
A practical compare workflow
Start with the original response on the left and the new response on the right. Run Compare, scan the summary for added, removed, and changed paths, then open the source documents at those paths. Format both documents first when you are debugging a human-readable change. For a list of records that needs a table, continue with JSON to CSV after the diff is understood.
FAQ
Does this JSON diff upload my documents?
No. Both sides are parsed and compared in your browser. After the page loads, it still works in airplane mode. TheDevTab never receives the JSON.
What does added, removed, and changed mean?
Added means a key or array item exists only on the right. Removed means it exists only on the left. Changed means the value or type is different at that path.
Does key order count as a difference?
No. Objects are compared by key names, not by the order those keys appear in the text. {"a":1,"b":2} and {"b":2,"a":1} are treated as equal.
Is this a merge tool?
No. This page lists differences. It does not patch, merge, or rewrite files. Copy writes a plain-text summary of the changes to your clipboard.
How are arrays compared?
By default, array values are compared by index. Enable Ignore array order to compare arrays as unordered bags of values when their order is not meaningful.
Does whitespace affect the result?
No. Both inputs are parsed as JSON before comparison, so indentation and line breaks are ignored. Invalid JSON is reported separately for the left or right input.