JSON Diff.
Compare two JSON documents and see every added, removed and changed value by path.
Runs in your browserAbout JSON Diff
JSON Diff compares two JSON documents by structure, not by text. Paste the original on the left and the changed version on the right, and the tool lists every difference with its path, such as $.db.pool changed from 10 to 20 or $.features[1] removed. Because both sides are parsed first, formatting, whitespace and key order never show up as changes: {"a":1,"b":2} and a pretty-printed {"b": 2, "a": 1} are equal. Alongside the path list you get a classic unified diff of both documents, pretty-printed with two-space indentation and, by default, with keys sorted so that the lines line up. A typical use is checking what an API response, a feature-flag file or a package-lock entry looks like before and after a deploy. The table also flags type changes separately: a port that went from the number 8080 to the string "8080" looks identical in many logs, but it is exactly the kind of change that breaks a strict client. Arrays are compared position by position, so inserting an element at the start of a list shows every later element as changed; sort both arrays first if their order does not matter. Numbers are compared by value, so 1.0 and 1 are equal, and very large integers lose precision exactly as they do in JavaScript. If either side is not valid JSON, the error points to the line and column on that side. Both documents stay in your browser: nothing is uploaded or stored.
How to Use
- Paste the original JSON on the left and the changed JSON on the right.
- Read the changes table for paths, or the unified diff for a line view; toggle key sorting if you need the original order.
- Copy or download the diff.
Frequently Asked Questions
Does key order count as a difference?
No. Objects are compared key by key, so reordering keys is never reported in the changes table. Turn off key sorting if you want the unified diff to show the original order.
How are arrays compared?
By index. Element 0 is compared with element 0, and so on; extra elements are reported as added or removed. Inserting an item at the front therefore shifts every later index.
What does "type changed" mean?
The value at that path changed its JSON type, for example from number to string or from object to null. These changes are listed separately because they often break strict clients.
Is my JSON sent to a server?
No. Parsing and comparison run in your browser, and the page makes no network requests while you use it.
Related Tools
Pretty print, minify, and validate JSON.
Compare two texts and see the differences.
Fix broken JSON — trailing commas, single quotes, comments, missing brackets — and see every repair made.
View JSON as a tree with types and sizes, and get the JSONPath and JSON Pointer of every value.
Convert JSON5 or JSON with comments (tsconfig, VS Code settings) to strict, standard JSON.
Generate typed code from JSON data.