JSON Pointer & Patch

Client

Resolve a pointer path, apply a patch array, or generate a minimal patch from document A to B. No data leaves your browser.

Learn more: Pointer, Patch, and diffs

Resolve RFC 6901 pointers, apply RFC 6902 patch arrays, or generate a patch between two documents—complements structural compare when you need an explicit operation list.

Pointers

A pointer is a path of segments starting with `/`. `~0` and `~1` escape `~` and `/` inside keys. Arrays use numeric segments.

Patches

Apply runs operations in order. Generate patch compares two JSON values and emits add/remove/replace/move/copy operations your API or tests can replay.

Pointer / Patch / RFC 6902

?

Resolve uses RFC 6901 pointers. Apply applies an RFC 6902 patch array. Generate builds a diff patch between two JSON documents.

URL prefill: q / qb for document, pointer, patch / patchb, left / right for generate, tab=resolve|apply|generate.

Nearby workflows on Toolcore

  • JSON formatterwhen the document must parse before any transform or export.
  • JSON Merge Patchwhen RFC 7386 merge patches fit better than RFC 6902 ops.

Common use cases

  • Resolve RFC 6901 pointers against a document when debugging APIs or explaining nested paths in reviews.
  • Apply RFC 6902 patch arrays to update configs without hand-merging large JSON trees.
  • Generate a minimal patch from document A to B to see what changed or to ship incremental updates.
  • Validate pointer paths in JSON Schema `$ref` fragments or OpenAPI components before your bundler inlines them.

Common mistakes to avoid

  • Forgetting pointer escape rules

    Tilde (~) and slash (/) in keys must be escaped in pointers (~0 and ~1). Wrong paths silently resolve elsewhere or fail.

  • Applying patches in the wrong order

    Some patches depend on prior operations. Reorder or split steps if intermediate states differ from what the server expects.

  • Assuming “test” operations always exist in generated diffs

    Some diff generators omit test ops. If your API requires optimistic concurrency, add tests explicitly or confirm your server’s patch contract.

FAQ

Are pointer and patch operations performed locally?

Yes. Resolution, application, and diff generation run in your browser; documents are not uploaded.

Does this validate my JSON Patch against every RFC edge case?

It follows common RFC 6901/6902 behavior for typical documents. For security-critical servers, still validate patches with the same library your API uses.

Should I use this or JSON Merge Patch (RFC 7396)?

Use JSON Patch when you need an explicit ordered op list (add/remove/move/test). Use merge patch when a single small object expresses the delta and null means remove.

Related utilities you can open in another tab—mostly client-side.