Developer

Runs in your browser. No file uploads for processing.

JSON Patch Tester: Preview RFC 6902 Operations

Dry-run an RFC 6902 JSON Patch against a local document. See which operation failed, check pointer escapes, and download only a successful result.

Loading tool...

How to test a JSON Patch before applying it

  1. Open the base JSON and the patch

    Paste both inputs or open two local files. The patch must be a JSON array of operation objects.

  2. Run the patch in order

    In the example, /a~1b/~0draft/id addresses the id under the keys a/b and ~draft. The test checks that exact large integer before /tools/- appends an item.

  3. Review the output or the first failure

    Download the resulting JSON only after every operation passes. If it fails, the report shows where it stopped without offering a partial document.

Use cases

  • Rehearse API or configuration patch files without calling an endpoint.
  • Debug array index changes, slash and tilde escapes, or a failing precondition.

Limits and privacy

  • Up to 256 KiB per input and 100 operations; long pointers, duplicate object keys, excessive depth or output size are rejected.
  • Supports add, remove, replace, copy, move and test and preserves exact numeric values. Supports document-root add/replace/test; does not offer root deletion or JSON Merge Patch (RFC 7396). No server call or API update.

The tool processes inputs in your browser. Account features and usage analytics are separate.

Frequently asked questions

How do I compare the original and the result by structure?

Use JSON Structure Diff to see which paths changed between the original file and your downloaded rehearsal result.

What happens if one operation fails?

The preview stops at the first failure. Earlier operations are shown as passed in the rehearsal, but no final or partially updated JSON is offered.

How do I reference a key that contains a slash or tilde?

Escape a slash as ~1 and a tilde as ~0 within a JSON Pointer segment. An empty pointer addresses the root; a single slash addresses the key that is an empty string.

Can it preserve integers beyond JavaScript’s safe integer range?

Yes. Large numeric tokens are not rounded to JavaScript Numbers. A test compares exact decimal values, so numerically equivalent notations are treated as equal.

Does this change my files or call my API?

No. The tool only rehearses the patch in your browser. Downloaded JSON is a new file, and neither input is uploaded or changed.

Related tools