Why a plain text diff isn't enough for JSON
Two JSON files can mean exactly the same thing and still look completely different as text: keys in another order, different indentation, everything on one line. A text diff flags all of that as change. This JSON compare parses both sides first and walks the two trees together, so it reports differences in data, not in formatting.
That's the view you want when checking an API response after a deploy, comparing a package.json or tsconfig.json between branches, or confirming a migrated config file carries every setting across.
How to read the result
- Added: the path exists only in the changed document.
- Removed: the path exists only in the original.
- Changed: the path exists in both, with a different value.
- Type changed: the value switched type, for example from number
1to string"1", or from an object to an array.
Invalid JSON is reported with the parser's error message and position so you can fix it. Comments and trailing commas aren't valid JSON; if your file uses them (JSON5, JSONC), remove them or use the text compare instead.
Questions
Does key order matter when comparing JSON?
No. JSON objects are unordered, so {"a":1,"b":2} and {"b":2,"a":1} are reported as equivalent. The line-by-line view sorts keys on both sides before diffing for the same reason.
What about the order of items in arrays?
By default array order matters, because in JSON [1,2] and [2,1] are different values. Untick "Array order matters" to compare arrays as multisets: items are matched by value, and only items missing from one side are reported.
What do the paths mean?
Each path points to a value using dot and bracket notation, similar to JavaScript: user.roles[2] is the third item of the roles array inside user. Keys with spaces or symbols are shown in quotes, e.g. headers["Content-Type"].
Is 1 the same as 1.0 or "1"?
1 and 1.0 are the same JSON number, so they are equal. "1" is a string, so a change from 1 to "1" is reported as a type change.
Is my JSON sent anywhere?
No. Parsing and comparison happen in your browser with the built-in JSON parser. Nothing is uploaded.