JSON Diff & Compare Online
Paste two JSON documents and see exactly which paths were added, removed, or changed. Use it to compare API responses, configuration files, fixtures, snapshots, and migration output without uploading your data.
🔒 Your data stays in your browser. FixTools does not upload this JSON for processing.
How to use JSON Diff & Compare
- Step 1
Paste the original JSON in the left editor and the updated JSON in the right editor. Both documents must be valid JSON.
- Step 2
Click Compare JSON. FixTools parses both values and recursively checks matching object keys, array positions, primitives, and nested values.
- Step 3
Review ADDED, REMOVED, and CHANGED paths. Copy the result or correct invalid JSON first if either document cannot be parsed.
JSON compare example
If an API response changes a status field and adds a plan field, a structural diff highlights only those meaningful changes instead of treating the whole line as different.
Example input
Original: {"user":{"name":"Ada","active":true}}
Updated: {"user":{"name":"Ada","active":false,"plan":"pro"}}Example output
CHANGED $.user.active before: true after: false ADDED $.user.plan added: "pro"
What this tool does
A JSON diff compares the parsed structure of two JSON documents rather than only comparing raw text. FixTools recursively walks objects and arrays and reports changes using paths such as $.user.email or $.items[2].price. That makes structural changes easier to understand when formatting or property order differs.
Common use cases
- • Compare old and new API responses during a backend release
- • Review JSON configuration changes in code review
- • Check migration output against source records
- • Compare test fixtures or snapshot data
- • Find exactly which nested property changed in a large payload
How it works
The comparer parses both inputs with JSON.parse, then recursively traverses matching structures. Object key order does not matter because keys are compared by name. Arrays are positional: items at index 0, 1, 2 and so on are compared against the same indexes in the other document.
Limitations and edge cases
Array order matters in this implementation. If two arrays contain the same values in a different order, those positions will appear changed. The tool also compares values strictly, so the number 1 and the string "1" are different. For semantic comparison that ignores array order or uses custom identity keys, a domain-specific comparison strategy is required.
Related concepts
Structural comparison vs. text diff
A text diff compares characters or lines. A structural JSON diff parses the document first, so whitespace and object-key formatting do not create false differences.
JSON path notation
Difference locations are shown with a root $ followed by object properties and array indexes, making nested changes easy to locate.
JSON Diff & Compare FAQ
How do I compare two JSON files?
Paste the contents of each JSON file into the two editors and run the comparison. The result lists added, removed, and changed paths.
Does JSON object key order affect the comparison?
No. Object properties are compared by key, so {"a":1,"b":2} and {"b":2,"a":1} are treated as equivalent.
Does array order matter when comparing JSON?
Yes in this tool. Arrays are compared by index, so reordering elements can produce changes even when the same values are present.
What is the difference between JSON diff and a normal text diff?
A JSON diff compares parsed data structures. A text diff compares raw characters or lines and can show noise caused only by whitespace or formatting.