JSON Diff — Compare JSON Online
Compare two JSON documents online and see exactly what changed. Added, removed and changed values with their paths, order-insensitive for objects. Runs in your browser.
What changed
All comparison happens locally in your browser. No data is sent to any server. Your JSON stays completely private.
What It Does
This tool compares two JSON documents and tells you precisely how they differ. Instead of eyeballing two blobs of text or trusting a plain character diff — which drowns you in noise the moment indentation or key order changes — it compares the actual data. It parses both sides and walks them structurally: object keys are matched by name (so reordering keys is correctly treated as no change), and array items are matched by position. Every difference is reported as an addition, a removal, or a change, each with the exact path where it happened and a running count of how many of each there are. Values that changed type — a number becoming a string, or anything becoming null — are called out separately, because those are the differences most likely to break code downstream. Because it works on parsed data, comparing a minified file against its pretty-printed version correctly reports no differences at all.
When to Use It
- You changed a config or API payload and need to confirm exactly which fields moved, and that nothing else did.
- Two environments (staging vs production) return different JSON and you need to pinpoint the divergence.
- A code review or bug report needs a clear, path-by-path list of what changed between two responses.
- You reformatted or minified a file and want to verify the values are untouched — a structural diff should show zero changes.
Worked Examples
Change + add + remove a field
replicas changed (2 → 3), region was added, and active was removed — three differences, each shown with its path.
Same keys, different order
Same keys in a different order. Because object comparison is order-insensitive, this reports zero differences — exactly what a character diff would get wrong.
A type change and an array edit
id changed type (number 42 → string "42"), flagged separately, and the array item at position 1 changed (y → z).
Features
How to Use
1. Paste the original JSON on the left and the changed JSON on the right. 2. The differences appear instantly, grouped into added, removed and changed with their paths. 3. Review the counts and any flagged type changes. 4. Use Swap to reverse the comparison, or Copy to copy the diff as text.
Common Mistakes
- Using a plain text/character diff for JSON. Reindenting or reordering keys produces a wall of false differences; a structural diff ignores formatting and key order.
- Assuming arrays are compared like sets. Arrays are matched by position, so the same items in a different order will show as changes — reorder or sort first if order isn't meaningful to you.
- Overlooking type changes. A number that became a string looks almost identical but can break consumers; check the flagged type changes specifically.
- Comparing when one side is invalid. Both documents must parse — fix any reported syntax error first, or you're comparing against nothing.