/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.

json-diff://local

Original JSON

10 MiB

Modified JSON

10 MiB

RFC 6902 JSON Patch

Ready. Paste original and modified JSON, then compare locally.

/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.

  1. Paste the original and modified JSON.
  2. Select Compare or press Ctrl/Command + Enter.
  3. Review the change list and generated patch.
  4. Copy or download the application/json-patch+json document.

/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.