JSON Compare Online: Side-by-Side Field Diff with Highlights

2026-07-20

When to compare JSON

API upgrades, config releases, mock vs production payloads—eyeballing two blobs misses fields. ComTools JSON Compare (Tools/Json/Compare) uses dual panes, formats both sides, then diffs by object path with inline highlights.

Processing is local in the browser—nothing is uploaded.

Features

Feature Details
Dual editors Independent A / B inputs
Format then compare 2 / 4 spaces or Tab
Path-level diff Detect added, removed, and changed values
Inline highlight Colored marks on differing lines
Identical Status shows documents are the same

Steps

  1. Open JSON Compare.
  2. Paste JSON A (e.g. old response) on the left, B on the right.
  3. Choose indent (default 2 spaces).
  4. Click Compare.
  5. Read the diff count and jump to highlighted lines.

Use Sample for a quick demo (version 1→2 plus a new lang field).

Example

A

{
  "name": "ComTools",
  "version": 1,
  "free": true
}

B

{
  "name": "ComTools",
  "version": 2,
  "free": true,
  "lang": "zh-CN"
}

Highlights call out the version change and lang addition.

Common scenarios

Scenario Approach
API regression Old response A, new response B
Config release Before / after paste
Validate first JSON Validator on each side
Hard to read Format then compare
Spreadsheet versions Excel Compare

Notes

  • Both sides must be valid JSON; a parse error stops the diff.
  • Comparison uses parsed data—whitespace-only differences often become “same” after format.
  • Key order usually does not matter for value equality; watch paths and values.
  • For huge payloads, trim to a subtree first.

FAQ

Array reorder = diff?
Elements are compared by index; reordering often shows many changes. Sort first if you only care about set membership.

Floating point?
Exact JSON number values—no fuzzy tolerance.

Export a report?
UI highlights and counts today; screenshot or keep both originals for archives.


中文版