Skip to content

Tools/JSON Diff

JSON Diff

Diff two JSON documents and deep-merge objects locally.

Loading tool…

How to use JSON Diff

  1. 1. Paste left and right. Or drop a file into the left pane.
  2. 2. Read the diff. Added and removed lines are prefixed.
  3. 3. Merge if you need a document. Objects merge recursively; arrays are replaced.
  4. 4. Copy. Local only.

About this tool

Two API responses that should be the same rarely are. A JSON-aware diff beats eyeballing pretty-print. Merge is for overlays (defaults plus environment), not for three-way git.

Arrays

This merge replaces arrays instead of concatenating them. That is the least surprising default for config overlays.

Key order

JSON objects are unordered in the spec; the diff still follows serialized order, so sort keys first if noise bothers you.

Code examples

Merge idea

{ ...base, ...overlay }

Frequently asked questions

Related tools

All tools