Home · Tools · JSON Diff

JSON Diff

Compare two JSON documents and see exactly what changed.

A (left)
B (right)
Diff

Compare two JSON files online — actually useful diff output

The JSON diff tool compares two documents and tells you exactly what changed: which keys were added, removed, modified, and where. The output is a flat list of paths (e.g. user.address.city) so you can copy them into a Jira ticket, a code review comment, or a debug log without anyone having to squint at two giant blobs side by side.

Why a JSON-aware diff beats a text diff

A line diff (the kind git diff gives you) treats JSON as text, so it gets confused by reordered keys, formatting changes, and trailing commas. Adding a single field can blow up into a 200-line diff because every subsequent line shifts. A JSON-aware diff parses both documents into objects and compares them structurally, so it ignores whitespace and key order while catching real semantic changes — added fields, removed fields, type changes, value changes.

Options that match real-world API testing

Use cases

Output format

Every changed field is shown with a sigil and a JSON path:

+ user.email: "alice@new.com"
- user.email: "alice@old.com"
~ user.age: 30 → 31
+ user.permissions[2]: "admin"

Plus (+) means added in B, minus (-) means removed from A, tilde (~) means the value changed. The status badge shows the totals (+3 -1 ~2) at a glance.

Privacy

Both inputs stay in your browser. The tool does not POST to any server, does not log payloads, and does not load any third-party scripts. Safe to paste production JSON.

Related tools

FAQ

Can I upload JSON files instead of pasting?
Yes, click 'Upload' on either pane to load a local .json file. Files are read in the browser using FileReader; nothing is uploaded.
Why are reordered arrays still showing as different?
By default arrays are compared by index. Toggle 'Ignore array order' to compare them as multisets — useful for tags, roles, and other unordered lists.
Does the diff support nested objects?
Yes. The output uses dotted JSON paths like user.address.city for objects and user.tags[2] for array indices, so deeply nested differences are easy to locate.
Can I diff JSON against YAML or another format?
Not directly. Convert YAML to JSON first with our ENV/JSON/YAML converter, then paste both as JSON.