Compare two JSONs to generate RFC 6902 patches with 6 operations, apply & verify
Zero Dependencies · Works OfflineThe JSON Patch Generator is a free online developer tool that automatically generates RFC 6902 standard JSON Patches by comparing two JSON documents. Supports add, remove, replace, move, copy, and test operations. Can apply patches to verify results match the target. Ideal for API partial updates, configuration change tracking, and version diff synchronization. All processing runs locally in your browser—no data is ever uploaded.
1. Paste source JSON in the "Source JSON" input.
2. Paste modified JSON in the "Target JSON" input.
3. Click "Generate Patch" to see the operation list and patch code.
4. Click "Apply & Verify" to confirm patch correctness.
Backend developers use JSON Patch for API PATCH methods, transmitting only changes to reduce network overhead.
Ops teams use JSON Patch to record each configuration change for audit and rollback.
Multi-user collaboration uses JSON Patch to sync modifications across clients and resolve conflicts.
JSON Patch (RFC 6902) is a standard format for describing JSON document changes, consisting of an ordered list of operations. Each operation contains op (type), path (JSON Pointer), and value (for some operations). JSON Pointer (RFC 6901) uses /-separated paths with ~ and / escaped as ~0 and ~1. JSON Patch is atomic—all operations succeed or all fail. The test operation enables conditional checks; if the value doesn't match, the entire patch fails. Compared to JSON Merge Patch (RFC 7396), JSON Patch is more powerful for array operations but has more complex syntax.
RFC 6902 format for describing JSON changes using operation lists. Commonly used for API partial updates.
6: add, remove, replace, move, copy, test.
RFC 6901 path expression using /-separated keys, e.g., /user/name. Arrays use numeric indices.
Patch uses explicit operations, handles arrays. Merge Patch uses merge semantics—simpler but can't handle partial array changes.
No. All comparison and patch generation runs locally.