difference JSON Compare
Compare two JSON documents by structure, not by text. Key order and formatting are ignored, so you only see what actually changed.
Comparing JSON with an ordinary text diff produces a lot of noise. Reorder a couple of keys, reindent a block, or switch from tabs to spaces, and a line-based tool reports dozens of differences even though the data is unchanged. This tool parses both documents and compares the resulting values instead, so key order and formatting are ignored entirely and you see only what genuinely differs - which keys were added, which were removed, and which values changed.
How to use this tool
- Paste the original JSON on the leftAny valid JSON works: an object, an array, or even a bare value.
- Paste the changed version on the rightIf either side is invalid, you get the exact line and column rather than a character offset.
- Read the summary countsAdded, removed, changed and unchanged are counted separately. Click any of them to hide or show that category.
- Work through the pathsEach row shows a path like user.roles[0] with the value from both sides, indented by nesting depth.
- Copy the differencesOne button copies just the changes as plain text, ready for a commit message or a bug report.
Why use it
- Ignores key order, so two objects with the same data compare as identical.
- Ignores whitespace and indentation entirely - only values are compared.
- Reports a type change as one difference rather than expanding it into dozens of adds and removes.
- Gives the exact line and column when JSON fails to parse, instead of a raw character position.
- Filters by category, so you can hide unchanged rows and focus on what moved.
- Runs entirely in your browser, which matters when the JSON is an API response containing real data.
Common uses
- Checking what changed between two API responses.
- Comparing a config file before and after a deployment.
- Reviewing a JSON fixture change in a pull request.
- Verifying a data migration produced the same structure.
- Debugging why two environments behave differently by diffing their settings.
Tips for better results
- Use the Format button on either pane to pretty-print it with keys sorted - it makes the two sides much easier to read side by side.
- Turn off the "same" filter to focus purely on differences. It is off by default for that reason.
- If an array shows far more changes than you expect, check whether an item was inserted near the start. Arrays are compared by position.
- For a genuinely text-level comparison - whitespace, line endings, ordering - use the Diff Checker instead.
Mistakes to avoid
- Using a text diff for JSON and then chasing differences that are only formatting.
- Expecting arrays to be matched by content. Inserting an item at the top shifts every later index, so everything after it reads as changed.
- Assuming null and a missing key are the same. They are different, and both are reported distinctly here.
- Pasting JavaScript object literals rather than JSON. Unquoted keys, single quotes and trailing commas are not valid JSON.
Frequently asked questions
A text diff compares lines. This parses both documents and compares the actual values, so reordered keys and different indentation are not reported as changes. For JSON that is almost always what you want.
No. {"a":1,"b":2} and {"b":2,"a":1} are reported as identical, because in JSON they describe the same object. If you need order-sensitive comparison, use the Diff Checker.
Position by position - index 0 against index 0, and so on. That is predictable, but it means inserting an item near the start shows every later item as changed. Matching array items by content would need a key the data may not have.
It shows where in the document the difference sits. user.roles[0] means the first element of the roles array inside the user object. The root of the document is shown as (root).
No. Parsing and comparison both happen in your browser. Nothing is sent to a server, which matters when you are diffing API responses that contain real customer data.
You get a message naming the line and column where parsing failed. That is more useful than the browser's native message, which quotes a character offset nobody can locate in a pasted document.
Yes. Objects, arrays and even bare values like a string or a number all work.
Yes, and it reports it as a single change. If a value goes from an object to an array, you see one row rather than every key listed as removed and every element as added.
No. A key present with a null value is different from a key that is absent, and the two are reported separately - as "changed" and "removed" respectively.
No fixed limit, though very large documents use browser memory and take longer to render. Files of a few megabytes are typically fine.
It pretty-prints that pane with two-space indentation and sorts the keys alphabetically. The comparison already ignores key order, but sorting makes the two sides far easier to read side by side.
Yes, completely free with no sign-up and no limits.