Applies an RFC 6902 JSON Patch to a JSON document.
JSON Patch (RFC 6902) applies a sequence of patch operations to a JSON document and returns the updated result, formatted with two-space indentation. Paste your source JSON and an array of operations to add, remove, replace, move, copy, or test values addressed by JSON Pointer paths. It's handy for testing patch payloads, debugging PATCH API requests, and previewing how a diff transforms a document.
No. The tool runs entirely in your browser using JavaScript, and your JSON document and patch are never uploaded or sent anywhere.
All six RFC 6902 operations are supported: add, remove, replace, move, copy, and test. The patch must be a JSON array of operation objects.
Use the '-' token as the array index in an 'add' operation path (for example, /items/-) to append the value to the end of the array. A numeric index from 0 up to the array length inserts at that position instead.
The tool throws a descriptive error, such as an invalid JSON Pointer, an out-of-range array index, or a missing object key. A failed 'test' operation also reports the path where the comparison did not match.
If the patch field is empty, the tool simply parses and re-formats your JSON document with two-space indentation, leaving its contents unchanged.