JSON差异对比

递归比较两份 JSON,标出新增/删除/修改。

diff对比比较
关于「JSON差异对比」

它属于「JSON 工具」分类:JSON 的格式化、结构变换与各种数据格式互转。

完全免费、无需注册;所有处理都在浏览器本地完成,文件不会上传到任何服务器。

相关关键词:JSON差异对比、JSON 工具、diff、对比、比较、在线工具、免费

如何使用「JSON差异对比」
  1. 打开工具:打开「JSON差异对比」页面,无需注册、无需安装任何软件。
  2. 准备输入:准备好要处理的内容或文件:文本可直接粘贴,文件可拖入页面(本工具属于「JSON 工具」)。
  3. 填入内容:把内容粘贴进输入框,或把文件拖入页面;也可以点击「示例」先填入样例数据试一下。
  4. 设置选项并处理:按需调整页面上的选项,然后点击处理 / 转换 / 生成按钮。
  5. 获取结果:处理完全在浏览器本地完成,结果可直接复制或下载,文件不会上传到任何服务器。
常见问题
和普通文本对比有什么不同?
文本对比会把换行、缩进、键的书写顺序都算作差异,噪音很大。这里是按数据结构逐字段比较,只报告真正的语义差异。
数组是怎么比较的?
按下标逐位比较。因此在数组中间插入一个元素,会导致后续所有位置都被判定为修改,这属于预期行为。
能对比很大的文件吗?
可以,但差异条目过多时表格渲染会变慢。建议先缩小到关注的子结构再做对比。
JSON Diff (English)

Recursively compare two JSON documents, marking add/delete/change.

Belongs to “JSON Tools”: Format, transform and convert JSON to and from various data formats.

Free, no sign-up; everything runs locally in your browser and files are never uploaded.

Keywords: JSON Diff, JSON Tools, diff, compare, online tool, free

How to use it

  1. Open the tool:Open the “JSON Diff” page — no sign-up and nothing to install.
  2. Prepare the input:Prepare the content or file to process: paste text or drop a file onto the page (this tool belongs to “JSON Tools”).
  3. Provide the input:Paste your content into the input box or drop a file onto the page; you can also click “Sample” to try example data first.
  4. Adjust options and run:Adjust the options if needed, then click the process / convert / generate button.
  5. Get the result:Everything runs locally in your browser; copy or download the result — your files are never uploaded.

FAQ

How is this different from text diff?
Text diff treats newlines, indentation and key order as differences, producing huge noise. Here we compare field by field by data structure, reporting only real semantic diffs.
How are arrays compared?
Compared by index position. Inserting an element in the middle marks all later positions as changed — expected behavior.
Can it compare very large files?
Yes, but rendering slows when there are too many diff rows. Narrow to the relevant sub-structure first.

More tools in JSON Tools

  • JSON Formatter/Minifier — Beautify, minify, validate and highlight JSON.
  • Sort JSON Keys — Recursively sort object keys alphabetically to ease diffing.
  • Flatten JSON — Flatten nested structures into a.b.c single-level keys.
  • Unflatten JSON — Restore dotted-path objects into nested structures.
  • JSON to CSV — Convert an array of objects into a downloadable CSV.
  • CSV to JSON — Parse CSV text or files into a JSON array.
  • JSON to Excel — Export an array of objects as an .xlsx workbook.
  • Excel to JSON — Upload an Excel file and convert sheets to JSON.
  • JSON to XML — Convert JSON structures into well-indented XML.
  • XML to JSON — Parse an XML document into an equivalent JSON object.
  • JSON to YAML — Convert JSON into more readable YAML.
  • YAML to JSON — Parse YAML config into standard JSON.
  • JSON to SQL — Generate INSERT statements and CREATE TABLE DDL from arrays.
  • SQL to JSON — Reverse-engineer JSON data from INSERT statements.
  • JSON to Base64 — Convert JSON to and from Base64 with UTF-8 support.
  • JSON ⇄ Cookie — Convert between Cookie strings and JSON key-values.

返回崽崽工具箱首页