AI
AICreate

JSON Diff

Runs in your browser

Paste two JSON values and instantly see what changed — added, removed, and changed leaves are color-coded. Export the delta as a standard JSON Patch.

When this tool isn't the right fit

A semantic JSON diff is great for API responses, config snapshots, and feature-flag dumps. It is the wrong tool for several adjacent jobs — here's where to look instead.

  • Reordered arrays. Comparison is index-by-index, not set-based. Reversing a list of 50 items shows up as 50 changed entries, not a single move. If your data is order-insensitive, sort both sides before pasting, or treat arrays of objects as keyed sets and diff each by id externally.
  • JSONL / NDJSON streams. The parser expects one root JSON value per side. For server logs or event streams, group records into an array first or compare line-by-line with a regular text diff.
  • Whitespace and comment edits. Both sides are parsed first, so cosmetic changes — reflowed indentation, added //comments, key reorderings inside an object — disappear. That's usually what you want, but if you're reviewing a hand-edited config for accidental drift, run a textual diff (git, VS Code) too.
  • Number precision differences. JavaScript parses every number as a 64-bit float, so 9007199254740993 and 9007199254740992 compare equal. Diffing financial data with exact integer ids past 253? Pre-stringify those fields, or use a server-side diff in a language with arbitrary-precision integers.

The exported patch is plain RFC 6902 JSON: a flat array of {op, path, value} objects. Apply it with fast-json-patch in Node, jsonpatchin Python, or any of the dozens of compliant libraries — that's the point of the standard.

How It Works

1

Paste both sides

Drop the original on the left and the updated version on the right. Trailing commas and // comments are tolerated.

2

Read the delta

Every changed leaf is highlighted: green for added, red for removed, amber for changed. Toggle 'hide equal subtrees' for a focused view.

3

Export the patch

Download the diff as an RFC 6902 JSON Patch — apply it programmatically with any standard library.

Frequently Asked Questions

What is a JSON Patch?

RFC 6902 — a small list of add/remove/replace operations that, applied to the original JSON, produce the updated JSON. Most languages have a library that can apply one.

How are arrays compared?

Index-by-index. Reordering an array shows up as multiple changed entries — that's a deliberate choice; structural array diff (like git's longest-common-subsequence) is heuristic and often misleading for JSON.

Is my data uploaded anywhere?

No. Both sides are parsed and compared in the browser tab.

Related Tools