Skip to main content
CuteJSON
↑↓ Navigate Enter Select Esc Close

JSON Patch Playground

Work with RFC 6902 patches: apply one to a document, write one from two documents, or turn one around so it undoes itself.

Back to all tools

Keyboard shortcuts

These work wherever the matching action exists on this page.

Open the command palette
Ctrl/Cmd + K
Run the main action
Ctrl/Cmd + Enter
Format
Ctrl/Cmd + Shift + F
Minify
Ctrl/Cmd + Shift + M
Copy output
Ctrl/Cmd + Shift + C
Open file
Ctrl/Cmd + Shift + O
Download output
Ctrl/Cmd + S
Close this dialog
Esc
Open this dialog
F1 / ?

Local data

Everything below is stored only in this browser, on this device. None of it is ever sent anywhere, and closing this dialog is not required for that to stay true.

Unsaved drafts
Tools with remembered options

Recently opened files

    No files opened yet on this device.

    Share via link

    The content is packed into the part of the link after the # sign, which browsers never send to a server. Nothing here is uploaded to cutejson.com or anywhere else.

    Shares the first input on this page. On a tool with more than one, only that one is included.

    Nothing to share yet. Paste or type something first.

    Document

    Load from a URL

    Fetches the URL directly from your browser and loads whatever text it returns into this pane.

    Patch

    Load from a URL

    Fetches the URL directly from your browser and loads whatever text it returns into this pane.

    Result

    The result appears here.

    Affected paths

    The paths a patch touches appear here.

      Runs entirely in your browser. Nothing you paste is uploaded, and you can confirm that in your browser Network tab.

      About this tool

      A JSON Patch is a list of operations that turns one document into another. RFC 6902 defines it, and APIs that accept partial updates ask for it. This page does the four things that list is actually used for. Apply runs a patch against a document and prints the result. Generate compares two documents and writes the patch that turns the first into the second. Reverse runs a patch and writes the patch that undoes it, which needs the original document, because a remove says what to delete and not what was there. Check reads a patch on its own and reports whether it is well formed, which is the test worth running before sending one anywhere. All six operations are supported: add, remove, replace, move, copy and test. A patch is all or nothing, exactly as the specification requires: if one operation fails then none of them are applied, and the page says which one stopped and why. Values keep the text you wrote them with, so a twenty digit id survives a patch that never mentioned it and 1.0 stays 1.0. Comparison, which is what test asks and what generation uses to decide a value changed, reads 1 and 1.0 as the same number and ignores the order of object keys, while array order is data and is compared position by position.

      How to use

      1. Paste the document on the left and the patch on the right, or load the sample.
      2. Choose what to do: apply the patch, generate one from two documents, reverse one, or check a patch on its own.
      3. Read the affected paths, then copy or download the result.