Diff between two JSON objects
Compare two JSON objects and show differences.
JSON A
JSON B
Legenda colori
Come utilizzare JSON Diff
Attach the two JSON objects
Attach the original "A" JSON to the left column and the new "B" JSON to the right column. You can also use "Load Example" to see a real case immediately.
Start comparison
Click on "Compare": the recursive algorithm traverses objects and arrays to calculate added, removed, and modified keys, showing the full path of every difference (e.g., experience.years).
Read the report with color legend
Every difference is colored according to type: green for added, red for removed, yellow for modified. The counters above summarize how many of each type were found.
Copy text report
Use "Copy Report" to get a textual summary of all differences, useful for pasting into a pull request, ticket or code review chat.
Suggerimenti
- Use "Load Example" to quickly understand how to read the report before pasting your actual JSON.
- Compare API responses - normalize timestamps or dynamically generated IDs first: otherwise, the diff will signal "rumor" differences irrelevant to your business logic.
Domande frequenti
How are arrays compared?
Elements are compared element by element based on their numeric index (e.g. skills[2]), not content. Adding an element to the beginning of the array will result in all subsequent indices being "modified" even if only the content is shifted: this is a known limitation of positional-based diff algorithms.
Does your tool send my JSON data to a server?
No. Calculations are performed entirely in the browser using a recursive JavaScript algorithm: no network call, no data leaves your device. You can also use it with sensitive data in JSON files.
What happens if the inserted JSON is not valid?
The tool validates both inputs with JSON.parse before comparison. If either field contains malformed JSON, the exact parsing error (with character position if available) is shown instead of a diff report.
What's the difference between "modified" and "added/removed"?
Added - indicates a key present only in JSON B, Removed - indicates a key present only in JSON A. Modified - indicates a key present in both but with different values (compared using JSON serialization of leaf node values).
Does the tool support deeply nested JSON structures?
Yes, the algorithm is recursive and traverses objects and arrays at any level of nesting, building the full path with dot notation for objects and square brackets for arrays (e.g., experience.tags[0].name).