JSON 差异对比 — A line-based diff treats JSON as text. It shows every line that changed, but it cannot tell you that a single key was renamed, that key order shifted, or that one array element was added.
Both JSON values are parsed and compared in your browser. Nothing is uploaded — the diff never leaves your device.
Was JSON 差异对比 useful?
JSON 差异对比是什么?
A line-based diff treats JSON as text. It shows every line that changed, but it cannot tell you that a single key was renamed, that key order shifted, or that one array element was added.
A semantic JSON diff compares the parsed structure. It walks both values, finds the added / removed / changed paths, and shows them in a table. Key order in objects is ignored by default (toggle off if order matters in your case).
使用方法
-
Paste the two JSON values
Drop the "before" JSON in the left panel, the "after" in the right. Both can be objects, arrays, or any JSON value — they do not have to be the same type.
-
Read the table
Each row is a path (e.g. users[3].email). Green rows are added, red rows removed, amber rows changed. Toggle "Show unchanged" to see what stayed the same.
-
Copy the patch
The "Copy patch" button puts a one-line-per-op summary in your clipboard — useful for sharing in chat or in a commit message.
示例
Detecting a renamed key indirectly
Two objects that differ in one nested value.
Before: {"user":{"name":"Ada","age":30}}
After: {"user":{"name":"Ada","age":31}} 结果: 1 changed: user.age 30 → 31
Array element added
An element was added to the end of a tags array.
Before: ["eng","lead"] After: ["eng","lead","reviewer"]
结果: 1 added: [2] "reviewer"
常见问题
相关指南
The 7 Best Free JSON Tools in 2026 (No Upload, No Signup)
A curated list of the best free JSON tools: formatter, validator, diff, tree viewer, minifier, schema validator, and YAML/TOML converter. All run in your browser.
The 6 Best Free API Testing Tools in 2026 (No Signup, No Install)
A curated list of the best free API testing tools: HTTP clients, request builders, response inspectors, and mock servers. All browser-based or self-hosted, all free, no signup required.
相关工具
Last reviewed: 2026-11-21