JSON Patch Generator
Compare two JSON documents and generate formatted RFC 6902 JSON Patch operations for API updates. Private, client-side, and free.
Loading tool...
What is JSON Patch Generator?
JSON Patch Generator is a free browser tool that compares an original JSON document with an updated document and produces RFC 6902 operations. It identifies nested changes and expresses them as add, remove, or replace instructions using JSON Pointer paths, making the result ready for API updates.
Key Benefits
- Generate precise API update operations automatically
- Compare nested objects and arrays without manual inspection
- Use the widely supported RFC 6902 format
- Keep JSON private with local browser processing
- Copy clean, formatted output for your workflow
Common Use Cases
- β’Prepare PATCH request bodies for REST APIs
- β’Review configuration changes in JSON files
- β’Create test fixtures for document updates
- β’Understand differences between API response versions
- β’Build JSON migration or synchronization workflows
How to Generate a JSON Patch
- Paste the original JSON: Enter the document before your changes in the Original JSON panel.
- Paste the updated JSON: Enter the document after your changes in the Updated JSON panel.
- Generate the patch: Click Generate JSON Patch to compare both valid JSON documents recursively.
- Copy the operations: Review the add, remove, or replace operations, then click Copy to use the patch in your API client.
Key Features
- Compare nested JSON objects and arrays recursively.
- Generate standard add, remove, and replace operations.
- Create correctly escaped JSON Pointer paths.
- Review clean, formatted patch output before using it in an API.
- Run locally in the browser with no data uploaded.
Frequently Asked Questions
What is a JSON Patch?
JSON Patch is an RFC 6902 standard format that describes changes to a JSON document as a sequence of add, remove, and replace operations.
Does this tool send my JSON to a server?
No. The comparison runs entirely in your browser, so the JSON you enter is not uploaded.
Does it support nested objects and arrays?
Yes. Objects and arrays are compared recursively, with JSON Pointer paths identifying each changed value.
What happens when the JSON is invalid?
The tool shows an error and does not generate a patch until both panels contain valid JSON.