🔀 JSON Comparator
Deep diff two JSON objects — colour-coded, filterable, fully expandable tree.
About JSON Comparator
When API responses change between versions, when environment configs drift, or when a backend refactor modifies nested data structures, you need a tool that can precisely show what changed — not just that something changed. This JSON Comparator performs a deep structural diff of two JSON objects and presents the result as a colour-coded interactive tree: green for added fields, red for removed fields, blue for changed values, and neutral for unchanged ones.
Unlike simple text diff tools, this comparator understands JSON structure. It recognises that{"a":1,"b":2} and {"b":2,"a":1} are semantically identical. The Ignore Array Order option extends this to arrays, letting you compare two lists of objects regardless of their order. All processing runs entirely in your browser.
How to compare two JSON objects
- Paste JSON A (the original/baseline) into the left panel.
- Paste JSON B (the updated/new version) into the right panel.
- Click Compare. The diff tree renders instantly with colour-coded results.
- Use the filter tabs (All · Added · Removed · Changed · Same) to focus on specific change types.
- Toggle Ignore Array Order if your arrays may contain the same items in different positions.
- Toggle Sort Keys to normalise key ordering before comparison.
- Use Expand All / Collapse All to navigate deep nested structures.
Features
🎨 Colour-coded diff
Green for added, red for removed, blue for changed, neutral for unchanged. Colour runs on the key, old value, and new value columns.
🌲 Interactive tree
Click any object or array node to expand or collapse it. Deep structures stay navigable with Expand All / Collapse All.
🔍 Filter tabs
Instantly filter to show only added, only removed, only changed, or only same fields — or see everything at once.
📊 Summary counts
A count of added, removed, changed, and same fields appears instantly after comparison.
⚙️ Ignore Array Order
Treats arrays as sets — two arrays with the same elements in any order are considered equal.
🔒 100% Private
Nothing is sent to any server. All diff logic runs locally in your browser via JavaScript.
Frequently Asked Questions
How is this different from a plain text diff tool?
A text diff tool compares lines of text character by character. It will flag {"a":1,"b":2} and {"b":2,"a":1} as different even though they are identical JSON objects. This comparator parses both inputs as JSON and compares the data structure semantically — key order doesn't matter unless you specifically care about it.
What does 'Ignore Array Order' do?
By default, arrays are compared positionally — element 0 against element 0, element 1 against element 1. With Ignore Array Order enabled, both arrays are first sorted into a canonical order and then compared positionally, which is what you want when an API returns the same items in a different sequence. It is not element matching: if the two arrays have different lengths, the surplus still shows up as changes rather than as a single insertion or deletion.
Can I compare deeply nested JSON with hundreds of fields?
Yes, up to 512 levels of nesting — past that the comparator says so rather than failing silently, which is far deeper than anything an API or a human produces. Width is unlimited. Use the filter tabs (Added, Removed, Changed) to jump straight to the differences without scrolling through unchanged fields, and Collapse All to fold the tree back down.
What do the three columns in the result mean?
The left column is the key path. The middle column shows the old value (from JSON A). The right column shows the new value (from JSON B). For added fields the old value is blank; for removed fields the new value is blank; for changed fields both are shown so you can see what it was and what it became.
Is my JSON data safe when using this tool?
The comparison itself never leaves your browser — parsing and diffing both run in this tab, and you can verify it by opening DevTools → Network while you click Compare. The one exception is the Save button: saving a comparison to your account deliberately sends both documents to the server so you can restore them later. If you have not clicked Save, nothing has been transmitted.