/tools/json-diff
JSON Diff & Patch
Compare JSON values rather than formatting, search changes by pointer, and generate or apply a verified RFC 6902 patch.
Original JSON
10 MiBModified JSON
10 MiBRFC 6902 JSON Patch
/compare
Semantic JSON diff instead of a text-only comparison
Whitespace and object property order do not create changes. Array order remains significant because an RFC 6902 patch addresses array members by index. Added, removed and replaced values are shown with copyable RFC 6901 JSON Pointer paths.
- Paste the original and modified JSON.
- Select Compare or press Ctrl/Command + Enter.
- Review the change list and generated patch.
- Copy or download the
application/json-patch+jsondocument.
/patch
Generate and apply RFC 6902 JSON Patch
Generated patches use add, remove and replace. The Apply function also supports move, copy and test. Application is atomic: if any operation fails, no partial result replaces the modified input.
Verified output
Every generated patch is applied to a clone of the original and must reproduce the target before it is shown.
Bounded fallback
Highly divergent arrays degrade to a correct subtree replacement instead of unbounded edit-graph work.
/limits
Safe API and configuration debugging
Documents are processed in a disposable worker and never uploaded. Inputs are limited to 10 MiB and 250,000 values. Integers outside JavaScript's exact range are rejected rather than silently rounded; use Text Compare when lexical number preservation is the primary concern.
Is this JSON Merge Patch?
No. This page implements JSON Patch from RFC 6902. JSON Merge Patch has different null and array semantics and is not generated here.
/faq
JSON comparison questions
Does object key order count as a change?
No. Objects are compared by key and value; array position remains significant.
Can a failed patch partly change the document?
No. The patch is applied to a clone and the result appears only when every operation succeeds.