What is a JSON Diff?
A JSON diff compares two documents and reports what changed between them. It is not the same operation as a text diff, and that distinction is the whole point: two JSON documents can be byte-for-byte different and semantically identical, because whitespace is insignificant and object keys are unordered.
This tool parses both sides and walks them as data. Comparing {"a":1,"b":2} with {"b":2,"a":1} reports no changes at all, where a line-based diff would light up the whole document. Each difference is reported at its path — user.address.city, items[2].price — with the kind of change, so you can locate it in the source without searching.
Arrays are compared by index, which is the honest reading: JSON arrays are ordered, so the third element is a different thing from the fourth even if their contents match. That means inserting an item near the front of a long array produces a run of changed entries, exactly as a positional diff should, rather than a single addition.
How to compare two JSON documents
- Paste the original document on the left and the changed version on the right. Both must be valid JSON — the error message names the side and the position that failed.
- Read the summary: added, removed and changed counts, plus how many distinct paths exist across both documents.
- Scan the change list. Green entries are additions, red are removals and amber are values whose contents differ — each shown as before → after.
- Turn on Show unchanged values too when you want the full picture, which is useful for confirming that a field you expected to change actually did not.
- Use the path in each entry to jump straight to the value in your own editor. Array positions are written as [n] and nested keys are joined with dots.
JSON Diff limits and rules
| Item | Limit |
|---|---|
| Comparison | Structural — parsed as data, so key order and whitespace never count as changes |
| Object keys | Matched by name, at any depth |
| Arrays | Compared by index, because JSON arrays are ordered |
| Number formatting | 1.0 and 1 are the same value; the raw text is not compared |
| Change cap | 2,000 differences per run, to keep the list readable |
| Duplicate keys | Standard JSON.parse behaviour applies — the last occurrence wins |
| Root value | Any JSON value works: an object, an array, a string or a number |
| Not covered | JSON Schema validation, merge or patch output, and comments, which are not valid JSON |
| Ordering differences | Not reported by design; sort an array intentionally if order matters to you |
When to use it
- Comparing two API responses — before and after a deploy, or one environment against another — to see exactly which fields moved.
- Reviewing a configuration change in a package.json, a tsconfig or a CI config, where a reordered file would bury a real edit in noise.
- Checking a data migration by diffing a sample record before and after the transformation.
- Confirming that a change really was cosmetic, by showing that the parsed documents are equivalent despite a reformatted file.
- Reading a large diff in a code review, where a structural view of the JSON blob is far quicker than scrolling a text diff.
Is it private?
Everything runs inside your browser. Your text and files are never uploaded, never stored and never seen by anyone else — including me. You can use the tool with the network tab open and watch no request leave the page. Closing the tab erases the input.
Frequently asked questions
Because they are identical as JSON. Whitespace between tokens is insignificant and object key order carries no meaning, so a reformatted or reordered file is the same document. If you need to compare the raw text, including formatting, use the text diff checker instead.
By index. JSON arrays are ordered lists, so position is part of the data. Inserting an element at the start of a ten-item array reports one addition and nine changes, which is the correct description of what happened, even though it reads as noisy at first.
The number of unique locations covered across both documents, counted once each. A path appears in that figure whether its value changed or stayed the same, so it is a measure of the shape of your data rather than of the difference.
Both documents are parsed in the browser, so the practical limit is your machine's memory. Documents in the low megabytes are fine; the difference list itself stops at 2,000 entries to stay readable, though the parsed comparison covers the whole document.
No. Both documents are parsed and compared locally in your tab, with no network request, which means you can paste real API responses or configuration without exposing them.
Related tools
Written and maintained by Md. Nur Hossain Repon.