/

JSON Diff

Processed Client Side

Compare two JSON documents and see exactly what was added, removed, or changed — down to the path.

JSON A · JSON B
JSON A · originalLength: 159Lines: 7Size: 159 BytesCursor: 1:1
JSON B · changedLength: 173Lines: 7Size: 173 BytesCursor: 1:1
Differences
Paste JSON into both panes and press Compare.

Bookmark this tool now — skip the search next time you need it.

About JSON Diff

This tool runs entirely in your browser. Whatever you paste is processed on your own device and is never uploaded, logged, or sent to any server.

Compare two JSON documents structurally and see exactly what changed, reported as paths rather than as lines. A text diff of JSON is noisy and often wrong for the question you are asking — reordered keys look like changes, reformatting looks like a rewrite, and a single edit deep in a nested object gets buried. This walks both documents and reports each difference as an added, removed, or changed entry with the full path to it, such as user.address.city, so you can see that one field moved without wading through everything around it. Swap the two sides in one click to check a comparison from the other direction. Long values are abbreviated in the report so a change deep inside a large document stays readable on one line rather than wrapping across a screenful.

Key features

  • Structural comparison rather than a line-by-line text diff — key order and formatting are irrelevant
  • Every difference reported as added, removed, or changed
  • Full dotted path to each difference, with array indices in brackets, such as items[2].price
  • Old and new values shown side by side for changed entries
  • Swap A and B in one click to view the comparison from the other direction
  • Clear both to start over
  • Long values abbreviated in the report, so a single large field does not bury the other differences
  • Arrays compared position by position, with each index reported as its own path
  • Parse errors reported per side, so you know which document is malformed
  • Runs entirely in your browser — configs and API payloads are never uploaded

How to use it

  1. Paste the original document into the first pane.
  2. Paste the document you are comparing it against into the second.
  3. Click Compare.
  4. Read the report — each entry names the path and whether it was added, removed, or changed.
  5. Use Swap to reverse the comparison if the direction is not what you meant.

Tips & common mistakes

  • Structural comparison is the right tool for JSON precisely because key order does not matter. A text diff reports reordered keys as changes; this does not.
  • Added versus removed depends on which document is on which side. If the report reads backwards, hit Swap rather than re-pasting.
  • The reported paths are directly usable — you can take user.address.city straight into a JSONPath expression or a lookup in your code.
  • This is the fastest way to find configuration drift between two environments. Export both configs and compare them rather than reading either.
  • For comparing two JSON files as text — to review formatting or produce a patch — use the Diff Checker instead.
  • If one side fails to parse, fix it in the JSON Formatter first; a comparison against a malformed document cannot tell you anything useful.
  • Arrays are compared by position, not by identity. Inserting one element at the front of a list therefore reports every following index as changed — correct, but rarely what you meant. Sort both sides by a stable key first when the order is not itself the thing you are checking.
  • Key order genuinely does not matter here, which makes this the right tool for comparing the same config serialised by two different libraries — a text diff would report the whole file as rewritten.
  • For any other kind of text or file, not just JSON, use the general Compare Files / Diff Checker.

Related tools

Browse all 24 JSON tools

Frequently asked questions

9

Paste the original JSON into the JSON A pane and the changed version into JSON B, then press Compare. Every added, removed, and changed value is listed with its path.

It is a structural diff — it compares the parsed JSON key by key, so reordering object properties or reformatting whitespace does not show up as a change.

Green marks properties that were added in JSON B, red marks properties removed from JSON A, and amber marks values that changed between the two.

Yes — arrays are compared by position because order is meaningful in JSON arrays. Object keys are compared by name regardless of order.

Because key order and formatting are irrelevant to JSON meaning. A text diff reports reordered keys and reindentation as changes; this compares structure and reports only real differences.

Each difference is reported with its full path, such as user.address.city or items[2].price. Those paths are directly usable in a JSONPath expression or a lookup in your code.

Added and removed are relative to which document is on which side. Click Swap to reverse the comparison rather than re-pasting both documents.

Yes, that is one of its best uses. Export the configuration from both environments and compare them here rather than reading either one line by line.

When you want to compare the two files as text — to review formatting, or to produce a unified diff patch. Use this tool when you care about the data rather than the file.