Free JSON Patch tool and API

How it works

jsonpatch.me is a free online service for running JSON Patch commands. JSON Patch is a transformation language for JSON files written in JSON.

If you remember XSLT for transforming an XML file to another XML file using XML transformation commands, JSON Patch is sort of the same but for JSON files.

jsonpatch.me has two features so far:

{
    "message": "Hello World",
    "from": "Unknown"
}
json
[
    { "op": "replace", "path": "/message", "value": "Patching JSON is fun" },
    { "op": "add", "path": "/with", "value": "jsonpatch.me" },
    { "op": "remove", "path": "/from" }
]
patch
{
    "message": "Patching JSON is fun",
    "with": "jsonpatch.me"
}
result

On-demand Patch

If you need a single patch using a source JSON file and a JSON Patch file, you can use the on-demand tool available.

Input JSON and one or more patch commands below and see magic happen:

Patch API

API Documentation

If you need to run JSON Patch commands on a continuous basis (like from a build-server), you can use the JSON Patch API documented below. The JSON Patch API will let you upload JSON Patch commands on run these commands by making POST requests with the JSON to patch in the body.

Input JSON and one or more patch commands below and see magic happen:

POST https://api.jsonpatch.me/upload/
[
    { "op": "replace", "path": "/message", "value": "Patching JSON is fun" },
    { "op": "add", "path": "/with", "value": "jsonpatch.me" },
    { "op": "remove", "path": "/from" }
]

This will return a JSON response:

{ "isSuccess": true, "templateId": "94188217-e01f-4951-af9b-e32418b23e7c" }

To patch a JSON document using the uploaded template use the following endpoint:

PATCH https://api.jsonpatch.me/patch/?templateId=94188217-e01f-4951-af9b-e32418b23e7c
{
    "message": "Hello World",
    "from": "Unknown"
}

The request will return the patched JSON:

{
    "message": "Patching JSON is fun",
    "with": "jsonpatch.me"
}