JSON Diff Online
Compare two JSON documents and see exactly what changed - every added, removed and edited value with its exact path. Free, fast, and private: everything runs in your browser.
Your JSON stays in your browser. Nothing is uploaded or stored by JSON Patch Online.
Source JSON
Target JSON
Your semantic diff appears below. The RFC 6902 patch stays one tap away. Press Ctrl+↵ to run.
Visual Diff
Semantic changes derived from the RFC 6902 patch. Object key order is ignored.
Compare two JSON documents to see their changes here.
How to compare two JSON documents
1. Paste both documents
Put the original JSON in the left editor and the changed version in the right one. You can also drop a .json file directly onto either editor.
2. Generate the diff
Press Generate. Both documents are validated and pretty-printed first, so formatting and whitespace never show up as false changes.
3. Read every change
Each operation in the result is one change: the exact path, what happened to it, and the new value. Copy it or download it with one click.
An example diff, line by line
Before
{
"name": "demo",
"version": 1,
"tags": ["a", "b"]
}After
{
"version": 2,
"tags": ["a", "b", "c"],
"debug": true
}The diff
[
{ "op": "remove", "path": "/name" },
{ "op": "replace", "path": "/version", "value": 2 },
{ "op": "add", "path": "/tags/-", "value": "c" },
{ "op": "add", "path": "/debug", "value": true }
]Read top to bottom: /name was removed, /version changed from 1 to 2, "c" was appended to /tags, and /debug appeared. Every change carries its JSON Pointer path, so nothing is ambiguous.
The operations follow RFC 6902: see how add, remove and replace work, or browse more real-world examples.
Tested output
Verified 19 September 2026 with fast-json-patch 3.1.1. For the before/after fixture above, the observed operations were add /tags/2 = "c" and replace /version = 2. Applying that patch reproduced the shown After document.
When you need a JSON diff
Code and config review
Comparing configuration files, API responses, package-lock.json changes, or infrastructure-as-code output is a daily task. A precise list of changed paths beats scanning raw files side by side.
Debugging API responses
When an API starts behaving differently, diff the response you expected against the one you received. Field-level changes stand out immediately, including subtle type changes like a string becoming a number.
JSON diff vs JSON Patch
A JSON diff answers "what changed" for a human. A JSON Patch (RFC 6902) is the same answer in a standard, machine-readable form. This tool gives you both at once: the operation list is the diff, readable as a change log and directly usable in an HTTP PATCH request or with any RFC 6902 library.
Private by design
The comparison itself runs in your browser and JSON Patch Online does not upload the editor contents. The page still makes ordinary hosting and cookieless Vercel Analytics requests. Share links encode editor state in the URL, so do not create or share one for secrets-bearing data.
Frequently asked questions
How do I compare two JSON files online?
Paste the original JSON into the left editor and the changed JSON into the right editor, then press Generate. The tool validates and pretty-prints both documents, then lists every difference as an operation with its exact path.
Is this JSON diff tool free and private?
Yes. It is completely free and runs 100% client-side. The diff engine does not upload or store your editor contents. The page still makes hosting and cookieless analytics requests, and a share URL contains encoded editor state.
What is the difference between a JSON diff and a JSON Patch?
A JSON diff shows what changed in a human-readable form. A JSON Patch (RFC 6902) is a machine-readable list of operations that transforms one document into the other. Here you get both: the same list works as a readable diff and as a patch you can apply with the JSON Patch Generator or any RFC 6902 library.
Does key order matter when comparing JSON?
No. Unlike text-based diff tools that compare line by line, this comparison is structural: reordered keys are not reported as changes. Only real value, type, and structure differences appear.
Go further with JSON Patch
Learn the RFC 6902 format behind this diff, or follow a hands-on tutorial in your language.