JSON Diff
Compare two JSON documents by structure and see every change at its path — key order and spacing ignored.
Original JSON
Changed JSON
Differences
Paste JSON on both sides to compare them by structure — key order and spacing are ignored.
Runs in your browser — nothing you enter leaves this device.
About this tool
What it does
JSON Diff compares two JSON documents as data rather than as text. It reads both, walks them side by side and lists every value that was added, removed or changed, each at its path — `customer.city`, `items[2].price`, `headers["content-type"]`. Because it compares structure, two documents that differ only in key order, indentation or line endings are reported as equal, which a line-by-line diff cannot do. It is built for the everyday checks: did this API response change after a deploy, what did a config migration actually touch, which fields differ between staging and production.
How to use it
- Paste the original JSON on the left and the changed JSON on the right, or press “Try an example”.
- Read the list below: + for added, − for removed and ~ for changed, with the old and new values side by side.
- For lists of records, type the field that identifies each item — usually id or sku — in “Match array items by key”, so a reordered list is not reported as changed everywhere.
- Filter to one kind of change with the Show buttons.
- Copy the differences as plain text for a pull request, ticket or chat message.
Limits and your data
- Arrays are compared by position unless you name a key. With a key, every item on both sides must have it as a string, number or true/false value, and no two items may share one; otherwise the tool falls back to position rather than guessing.
- Numbers are compared as numbers, so 1 and 1.0 are equal — JSON has a single number type. Very large integers beyond 2^53 lose precision when any JavaScript program parses them, and this tool is no exception.
- Each side can be up to 5 MB. The list stops at 2,000 differences and says so; two documents that different are usually not two versions of the same thing.
- Comments and trailing commas are not JSON, so a file that has them will not parse. Remove them, or run it through the JSON Formatter first.
- A difference in a deeply nested object is reported once, at its own path, not repeated at every parent.
- Both documents are parsed and compared in your browser. Nothing is uploaded or stored, so it is safe for API responses that contain tokens or customer data. Reloading the page clears both sides.
Questions
Why use this instead of the text diff?
A text diff sees lines. Reformat a file or reorder two keys and every line looks changed. This tool sees values, so only real changes are listed, and each one says exactly where in the document it is.
What does “Match array items by key” do?
By default the first item is compared with the first, the second with the second, and so on. If a list of orders is sorted differently, that reports almost everything as changed. Naming a key such as id pairs up items with the same id wherever they sit, so you see which records were added, removed or edited.
Is a change from "7" to 7 a difference?
Yes. A string and a number are different types in JSON, and many programs treat them differently, so the tool reports it as a change and shows both values with their quotes.
Can I use it to compare YAML?
Convert both files to JSON first with the YAML to JSON converter, then compare them here.