JSON Diff
Compare two JSON documents by structure and see every change at its path — key order and spacing ignored.
JSON Diff
Original JSON
Changed JSON
Differences
Paste JSON or open a file 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 differences as a tree — grouped under the object or list they belong to, each branch counting what changed inside it, and folding away what you don’t need — or as a flat list of paths: + 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. When every item on both sides has a unique id-like field, the tool offers it for you.
- 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, 1.0 and 1e0 are equal — JSON has a single number type. Large integers and long decimals are compared exactly as written, digit by digit, so two IDs beyond 2^53 that differ in the last digit are reported as changed (most JavaScript tools would call them equal).
- Each side can be up to 50 MB, pasted or opened from a file; the comparison runs in a background worker with a Cancel button. The list stops at 100,000 differences and says so, and long values are shortened on screen — the copied text has them at up to 200 characters. For larger documents, JSON Studio’s diff reads files without loading them whole.
- 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.