JSON 1

JSON 2

Differences

What a structural diff shows you that a text diff cannot

Two API responses look almost identical, but something changed and broke production. Or you're staring at a config file that worked yesterday and doesn't today. This page does the thing that is painfully slow by eye: it walks both documents key by key and reports what was added, what was removed and what changed value — as a JSON document you can copy straight into a ticket.

Because the comparison is structural (not just textual), key order and whitespace don't trip it up. A reformatted file with the same data shows zero differences. A renamed field shows up as one removal and one addition. That's the same approach RFC 6902 takes for JSON Patch, the official spec for describing JSON changes. To brush up on the underlying format itself, the official JSON specification or RFC 8259 are both good references. And when your inputs aren't strictly JSON — log snippets, partially-encoded payloads, or mixed text — a general-purpose text comparison tool covers that side of the workflow.

How to use it

  1. Paste the original – Drop your "before" version into the left panel. This is the baseline everything is reported relative to.
  2. Paste the updated version – Drop the "after" version into the right panel. Order matters: swap the two and every + becomes a - .
  3. Read the Differences pane – It is a JSON document, not a coloured side-by-side. A changed leaf appears as "key": { "old": …, "new": … }; a key only in the right document appears as "+key"; a key only in the left as "-key". Anything identical is left out entirely.
  4. Try the Sample first – Sample loads two versions of a subscriber profile into both panels at once, so you can see the output shape before pasting anything of your own.
  5. Stop reformatting first – The comparison is structural, so indentation, key order and minification make no difference. Two files that hold the same data report "no differences" however differently they are written.

Pro Tip: The diff nests the way your documents nest, so a change three levels down comes back three levels down — {"cell": {"band": {"old": "n78", "new": "n28"}}}. If you want a flat list of JSON Pointer paths instead, that is what RFC 6902 specifies and what a library such as jsondiffpatch will give you in code.

A worked example

Two versions of the same subscriber profile, and the exact bytes the Differences pane produces for them. Four keys moved; <code>msisdn</code> did not, so it does not appear in the output at all.

Before / After → Differences Compare
profile.before.json / profile.after.jsonunified view
  {
    "msisdn": "447700900142",
-   "plan": "Pay As You Go",
+   "plan": "Unlimited 5G",
-   "roaming": false,
+   "roaming": true,
-   "rsrp": -88,
+   "rsrp": -104,
-   "updatedAt": "2026-05-12"
+   "updatedAt": "2026-06-24"
  }
Differences pane4 changes
{
  "plan": {
    "old": "Pay As You Go",
    "new": "Unlimited 5G"
  },
  "roaming": {
    "old": false,
    "new": true
  },
  "rsrp": {
    "old": -88,
    "new": -104
  },
  "updatedAt": {
    "old": "2026-05-12",
    "new": "2026-06-24"
  }
}

Common Use Cases

API Version Regression Testing

You bumped an API from v1 to v2 and want to confirm nothing important changed in the response shape. Paste yesterday's response on the left and today's on the right — anything that shifted (a renamed field, a new optional property, a removed enum value) shows up immediately. This is the cheapest contract-testing pass you'll ever run.

Configuration Drift Detection

Two environments — staging and production — are supposed to share the same config but something is behaving differently. Export both configs, diff them here, and the offending key jumps out. Combined with a JSON validator sweep, this catches the majority of "works on my machine" issues before they reach an incident review.

Audit and Compliance Trails

Many compliance frameworks require you to show before/after state when sensitive records change. Use the diff to produce a human-readable summary of which fields moved between two snapshots — useful evidence to attach to a change request or audit log. For the formal change-description format, the JSON Patch RFC is worth bookmarking.

What the Differences pane gives you

  • Structural, not textual – whitespace, indentation and key order are invisible to it. Minified against pretty-printed reports no differences.
  • Output is itself JSON – so you can copy it into a ticket, a script or a test fixture. Added keys are prefixed +, removed keys -, changed leaves become { "old": …, "new": … }.
  • Nested objects are walked – and the report keeps their shape, so you read it the same way you read the input. Unchanged branches are omitted entirely.
  • Arrays are compared whole – see the FAQ; this is a deliberate trade, not an oversight.
  • Long integers survive – a 19-digit ICCID is reported as the digits you pasted, not the rounded double a plain parse would give.
  • Nothing leaves the page – both documents are parsed and compared in your browser.

Frequently Asked Questions

Does key order in objects affect the diff?

No. JSON objects are unordered by definition (see RFC 8259 §4). The tool compares by key name, so two objects with the same data in a different order produce zero differences.

How are arrays compared?

As single values. If anything inside an array changed, the whole array is printed on both sides — {"bands": {"old": ["n78","n28","n1"], "new": ["n78","n41","n1"]}} for one altered element. That is the deliberate trade: descending by index would report an element inserted at the front as a change to every position after it, which reads as a total rewrite of a list that barely moved. Position still matters, so ["a","b"] and ["b","a"] are different. For index-aware diffing with move detection, jsondiffpatch is the library to reach for in code.

What if the documents are not objects?

They are still compared. A JSON text can be any value, so "Reykjavik", 42 and true are all valid documents; when either side is one of those there are no keys to walk, and the pane reports the pair under a single (whole document) entry instead. Two identical scalars report no differences, which is what you would expect and is worth stating because an earlier version of this page silently reported {} for 42 against 43.

Can I compare large JSON files?

The comparison itself is a single pass over both trees and is not usually what you notice. What you do notice is the editor painting thousands of changed lines while you scroll them. If a diff comes back enormous, it is often more useful to narrow both sides to the subtree you care about and paste that — the answer is easier to read and the question is usually about one branch anyway.

Is my data safe?

Yes. Both documents are parsed and compared in your browser; neither is sent to a server, cached or logged. What this page cannot claim is that it works offline — it is a normal web page with no service worker, so a reload while disconnected will not load it. Once it is open, though, comparing costs no network at all, and the network panel will show you that.

My JSON has trailing commas or single quotes — will it still diff?

No. Both sides have to parse first, and the pane tells you which panel failed rather than printing an engine message at you. Take that side to the JSON Validator for the line and column, or to the JSON Fixer if the punctuation is obviously broken and you just want it repaired. MDN's JSON documentation lists what JSON does and does not allow.

Related Tools

Useful Resources

  • RFC 8259 – The current IETF spec for JSON; defines object equality and array ordering rules.
  • RFC 6902 — JSON Patch – Standard format for representing differences between two JSON documents.
  • JSON.org – Original JSON spec with railroad diagrams of the grammar.
  • MDN JSON Guide – Reference for parsing and serialising JSON in JavaScript.
  • jsondiffpatch – Open-source JS library that powers many web-based JSON diff tools, including support for array-move detection.
  • Stack Overflow JSON Tag – Community Q&A for tricky JSON edge cases and language-specific parsing.