YamlBox

JSON tools

JSON Diff — Compare Two JSON Documents

Paste two JSON documents and get a precise list of what changed — by path, not by line. Ideal for comparing API responses, config versions and payloads between environments.

Options

JSON — changed (right)

JSON — original (left)

Examples: Config — before · API response — before — ⌘/Ctrl + Enter converts · drop a file to load it · processed locally

Diff report

Output is read-only. Use Copy, Download or Share to move it out.

How to use the json diff tool

  1. Paste the original JSON

    The left pane holds the “before” document. Paste from a file or an API response.

  2. Paste the changed JSON

    Switch the second editor to your “after” document. The report updates as you type.

  3. Read changes by path

    Each change shows a JSONPath (like $.env.LOG_LEVEL), the old value, the new value, and whether it was added, removed or modified.

What makes this one different

  • Structural diff — key order and whitespace never produce false positives
  • Exact JSONPath for every change, so you can jump straight to it
  • Summary counts: added, removed and changed keys
  • Detects type changes explicitly (string → number, object → array)
  • Client-side: safe for comparing staging and production payloads

Privacy by architecture: this page contains no analytics that receive your input, and the conversion code runs in your tab. You can disconnect from the network after loading and keep working.

JSON Diff — frequently asked questions

How is this different from a text diff?

A text diff compares lines, so reformatting or reordering keys creates noise. This tool parses both documents and compares values by path, so it reports only real semantic changes.

Does it detect changed array items?

Yes — arrays are compared element by element. An element that exists in one document but not the other is reported as added or removed at an indexed path such as $.users[2].

Can it compare JSON with different key order?

Yes. Key order is irrelevant because both documents are parsed first. {"a":1,"b":2} and {"b":2,"a":1} compare as identical.

Can I compare YAML files too?

Convert them first with the YAML to JSON converter in another tab, then paste both JSON outputs here. Because the diff is structural, converting YAML to JSON first does not affect the result.

Searching for “compare json files”, “json compare online”, “json difference tool”? You are in the right place — browse all 19 tools.

Deeper reading

Blog · 6 min read JSON diff: comparing data the way it is actually structured Compare two JSON payloads with a structural JSON diff that ignores key order and whitespace, highlights moved values, and shows why text diffs mislead. Read the guide →