JSON Compare
Compare two JSON documents and get a clear diff of exactly what changed — every added, removed and changed value listed by its key path. Objects compare by key, arrays by index. Runs entirely in your browser.
Input
Output
| Path | Left Value | Right Value | Change |
|---|---|---|---|
| No data yet | |||
Guides
JSON Compare takes two JSON documents and shows you exactly what changed between them. Instead of squinting at two blobs of text, you get a clean table that lists every difference by its key path: what was added, what was removed, and what changed value. It runs entirely in your browser — your data never leaves your machine.
How to use it
- Paste your first document into Left JSON (think of it as the "before" or the baseline).
- Paste the second document into Right JSON (the "after", or the version you want to check).
- The diff table updates automatically as you type. Each row shows the Path, the Left Value, the Right Value, and the Change type.
If either box contains invalid JSON, you'll see a clear message like Left JSON: Unexpected token … so you know which side to fix. When the two documents are identical, the table is simply empty.
How the comparison works
The comparison walks both documents recursively:
- Objects are compared by key. A key that exists only on the left is
removed; a key only on the right isadded; a key on both sides whose value differs ischanged. - Arrays are compared by index.
list[0]on the left is matched againstlist[0]on the right, and so on. A longer array on one side producesaddedorremovedrows for the extra indices. - Primitive values (strings, numbers, booleans,
null) are compared for strict equality.
Paths use familiar dot-and-bracket notation — for example user.address.city or items[2].price — so you can locate any difference immediately, no matter how deeply nested.
Why a table instead of a text diff?
A raw text diff forces you to read line-by-line and mentally reconstruct which key moved where. A table keyed by path tells you at a glance that age changed from 30 to 31 and that country was added — no scanning required. You can copy the table or download it as a CSV for a changelog, code review, or bug report.
Is my data safe?
Yes. JSON Compare is a client-side tool: both documents are parsed and compared locally in your browser. Nothing is uploaded to a server, which makes it safe for configuration files, API payloads, and other sensitive data.
Common uses
- API response diffing — spot what changed between two versions of an endpoint's output.
- Config review — compare a working configuration against a broken one to find the offending key.
- Test fixtures — verify that an expected object and an actual object match, and see precisely where they diverge.
- Data migrations — confirm that transformed records still carry the fields you expect.
Frequently asked questions
Does the order of keys matter? No. Objects are compared by key name, so reordering keys does not produce differences.
How are arrays with reordered items handled? Arrays are compared strictly by index, so moving an element counts as a change at each affected position. This keeps results predictable and easy to reason about.
What counts as "changed" versus "added/removed"? A key present on both sides with a different value is changed. A key present on only one side is added (right-only) or removed (left-only).