{} JSON Diff — 在线比较两个 JSON 对象

Compare two JSON objects side by side with a color-coded tree diff. Green = added, red = removed, yellow = changed. Free online JSON diff checker.

Paste your two JSON objects into the panels and click Compare. The tool recursively walks both structures and highlights every added key (green), removed key (red), and changed value (yellow). Works with deeply nested JSON and arrays.

JSON A (Original)
JSON B (Modified)

How to Use

1

Paste two JSON objects

Enter your original JSON in the left panel and the modified JSON in the right panel.

2

Click Compare

Press the Compare button to run the diff. The tool parses and validates both inputs first.

3

Read the color-coded diff

Green = added, Red = removed, Yellow = changed value, Grey = unchanged. Expand nested objects with the arrows.

Frequently Asked Questions

How does JSON diff work? +
The tool parses both JSON inputs and recursively compares their keys and values. Added keys (only in the right JSON) are highlighted green. Removed keys (only in the left) are red. Changed values (same key, different value) are yellow. Unchanged keys are shown in grey.
Does it handle nested objects and arrays? +
Yes — the diff is fully recursive. Nested objects are compared key by key, and arrays are compared element by element by index. Structural differences at any depth are highlighted.
What happens if one JSON is invalid? +
If either input is not valid JSON, the tool shows a parse error with the location of the problem before attempting any comparison.
Can I use this to compare API responses? +
Yes — paste two API responses (from different environments, versions, or time points) and immediately see what changed. This is a common use case for debugging regression changes in API contracts.
Is my data sent to a server? +
No. All parsing and comparison runs entirely in your browser using JavaScript. Your JSON data never leaves your device.


完整指南:JSON差异比较工具

什么是JSON Diff?

比较两个JSON对象并高亮结构差异:新增键(绿色)、删除键(红色)、修改(黄色)。比纯文本diff更智能——理解JSON结构。适用于比较API版本间的响应变化。

如何使用

  1. 在左侧面板粘贴第一个JSON
  2. 在右侧面板粘贴第二个JSON
  3. 按类型高亮显示差异

专业技巧

🧰 50+ Tools