JSON Patch Generator
Generate JSON Patch operations by comparing original and modified JSON. Create add, remove, and replace operations with JSON Pointer paths, summaries, reports, and clean patch output.
Paste the current or before version of your JSON data.
Paste the new or after version to generate patch operations.
Options
Generates practical JSON Patch-style operations using JSON Pointer paths. The output is useful for APIs, config changes, test fixtures, and data reviews.
Output
Generated JSON Patch output will appear here.
Generating JSON Patch Operations from Two JSON Files
JSON Patch is a practical way to describe changes to JSON data as a list of operations. Instead of sending a full updated document, you can describe what changed with paths such as /settings/theme or /items/2.
This JSON Patch Generator compares an original JSON value with a modified JSON value and creates add, remove, and replace operations using JSON Pointer-style paths. It is useful for API updates, configuration changes, testing, and data review workflows.
Using the JSON Patch Generator
- Paste the original JSON in the left input box.
- Paste the modified JSON in the right input box.
- Choose patch output, report output, JSON output, or Markdown output.
- Select how arrays should be compared.
- Generate the patch and copy the operations.
Common JSON Patch Generator Use Cases
- Creating patch operations for API update requests.
- Reviewing changes between two JSON configuration files.
- Generating test fixture updates from before and after data.
- Documenting exact JSON changes for pull requests.
- Finding changed object fields without manually scanning large JSON.
- Creating compact change payloads for JSON-based systems.
Example JSON Patch Output
[
{
"op": "replace",
"path": "/settings/ads",
"value": true
},
{
"op": "add",
"path": "/settings/layout",
"value": "clean"
}
]JSON Pointer Paths in Patch Operations
JSON Patch operations use paths that point to a specific location in the JSON value. Object keys are separated with slashes, and array indexes are represented as numbers. For example, /tools/0 points to the first item in the tools array.
Special characters in object keys need escaping inside JSON Pointer paths. This tool escapes ~ as ~0 and / as ~1 so paths remain safe and predictable.
Frequently Asked Questions
What does a JSON Patch Generator do?
It compares original JSON and modified JSON, then generates patch operations that describe the changes.
Is this the same as JSON Diff Checker?
No. A diff checker shows differences. A patch generator creates operations that can be used to apply changes.
Does this support arrays?
Yes. It can compare arrays by index or replace a whole changed array depending on the selected option.
What operations does it generate?
It generates add, remove, and replace operations.
Is my JSON uploaded anywhere?
No. The patch is generated directly in your browser.
