JSON Diff
Compare two JSON documents and see exactly which paths were added, removed or changed.
What this tool does
JSON Diff parses both documents and then walks them together, matching objects key by key and arrays index by index. What comes back is not a line-by-line text comparison but a flat list of paths: every key present on one side only, and every value whose contents differ — a single leaf, or a whole branch where one side holds an object and the other an array. Each row names the location in dot and bracket notation — meta.owner, tags[2] — alongside the value held on each side, and the summary counts how many were added, removed and changed.
Because the walk is by key rather than by position, key order is irrelevant: the same object written with its fields in a different sequence yields no differences at all. That is deliberate, and it is why there is no sort-keys switch on this page — there would be nothing for it to change. Reindenting, minifying or rewrapping a document has the same non-effect. When those cosmetic edits are what you need to see, compare JSON as plain text with Text Diff; this tool answers only questions about structure and values.
Arrays are matched by index, and that is the limitation worth knowing before you trust the output. Insert one element at the front of a long list and every position after it shifts, so the result reports a change at each index plus a single addition at the end, rather than the one insertion you actually made. There is no move detection and no matching on an id field. Displayed values are abbreviated as well: anything beyond roughly 120 characters is cut with an ellipsis in the First and Second columns, so a long string is reported as changed without the whole of it being shown, and nothing inside a value is highlighted — the two versions sit side by side rather than marked up character by character.
A second gap comes from the browser's own number handling, which reads JSON numbers as 64-bit floats. Integers past about 9,007,199,254,740,992 — long database identifiers, timestamps counted in nanoseconds — are rounded as they are read, so two documents differing only in those final digits arrive as the same value and are reported as identical. The rest is straightforward: both documents are parsed and compared inside this browser tab, nothing is uploaded, and payloads carrying access tokens or customer records stay where you pasted them.
How to use it
- Paste the first document. Drop it into the input box, or press Load sample to see a pair that already differs in a few places.
- Supply the second document. Paste it into the Second document box. Leave that box empty and the input is split instead at the first line equal to the separator, which is --- until you change it.
- Read the change list. The result is a table of Change, Path, First and Second with one row per difference, and Copy output hands those four columns back as CSV. When nothing differs the table comes back empty and the summary line underneath reads Identical — no differences found.
Processing & privacy
Runs on your device. Your file is processed directly in this browser.
Common use cases
Comparing config across two environments
Staging and production settings drift apart quietly. A path list shows which keys were added or retuned, with none of the noise that differing indentation would add.
Checking what an API changed between versions
Capture a response before and after a deploy, and the comparison names the fields that appeared, vanished, or changed from a string to a number.
Verifying an export round-trip
Convert a document out to another format and back, then compare it against the original. Read the identical verdict for what it is: a match on structure and values, after the parser has already resolved key order, repeated keys and oversized integers.
Reviewing a feature flag or translation file
Long flat objects are painful to scan by eye. The object diff reduces a four-hundred-key file to the handful of entries that actually moved.
Questions
Are my documents uploaded?
Does key order count as a difference?
Why are two visibly different files reported as identical?
How are arrays compared?
Can I apply the result as a patch?
What happens if one document will not parse?
Related tools
- JSON Formatter — Pretty-print, collapse and inspect JSON instantly.
- Base64 Encoder Decoder — Encode and decode Base64 text and files.
- JWT Decoder — Inspect the header, payload and claims of a JWT.
- Hash Generator — Compute MD5, SHA-1, SHA-256 and SHA-512 digests.
- Regex Tester — Test patterns against sample text with live matches.
- Unix Timestamp Converter — Convert between epoch seconds and readable dates.