JSON Diff
Compare two JSON objects and visualize differences. Outputs RFC 6902 JSON Patch operations and a color-coded tree diff. 100% client-side.
How to Use
- Paste the original JSON into the Before panel.
- Paste the updated JSON into the After panel.
- Click Compare to run the diff.
- Review the Visual Diff for human-readable changes.
- Copy the JSON Patch to use in your application or API.
Use Cases
- Review API response changes between versions.
- Generate patch operations for PATCH HTTP endpoints.
- Audit configuration file changes.
- Debug unexpected data mutations in your application.
Related tool: JSON Formatter — prettify and validate JSON before diffing.
FAQ
What is RFC 6902 JSON Patch?
RFC 6902 defines a JSON document format for expressing a sequence of operations to apply to a JSON document. Each operation is an object with 'op' (add/remove/replace/move/copy/test), 'path' (JSON Pointer per RFC 6901), and optionally 'value'.
Is my JSON data sent to any server?
No. The comparison is done entirely in your browser using JavaScript. Nothing leaves your machine.
Can I compare large JSON files?
Yes, but very large objects (thousands of keys or deeply nested arrays) may take a moment to process. All computation is in-browser.
How does the visual diff work?
The tool performs a deep recursive comparison. Keys present only in 'After' are shown as additions (+). Keys present only in 'Before' are shown as removals (−). Keys with changed values are shown as changes (~) with both the old and new values.
How is this different from the Diff Checker tool?
The Diff Checker tool compares plain text line-by-line. This JSON Diff tool understands JSON structure — it compares values semantically, not textually, and outputs machine-readable JSON Patch operations.