JSON Diff Comparator
Compare two JSON files and find differences
About the JSON Diff Comparator
When two versions of a JSON document should match but something has drifted, scanning them line by line is slow and error-prone. JSON Diff parses both sides and compares them structurally, then reports exactly which fields were added, removed, or changed — by their full path inside the object.
That structural approach is what makes it useful where a plain text diff falls short: reformatting, reordered keys, or different indentation do not create false differences, because the tool compares parsed values rather than characters. API developers reach for it to spot what changed between a working response and a broken one; config owners use it to see which setting differs between staging and production.
Arrays are compared by position and objects by key, so a change at users[2].email is reported precisely there rather than as a vague "something in this block changed".
How to Use the JSON Diff Comparator
- Paste your first JSON document into the "JSON 1 (Original)" box.
- Paste the version you want to compare into "JSON 2 (Modified)".
- The comparison runs automatically as you edit — no button to press.
- Read the results: each entry shows its path and whether it was added, removed, or modified, with the old and new values for changes.
- Use Copy to export the diff as a readable +/-/~ list for a pull request or bug report.
Why Use ToolForge’s JSON Diff Comparator
- It compares parsed structure, not text, so reformatting or different indentation never shows up as a false change — only real value differences do.
- Every difference is reported with its full path (such as items[0].price), so you can jump straight to what changed instead of hunting through nested blocks.
- It distinguishes added, removed, and modified explicitly, including the before and after values for each change.
- Both documents are parsed and compared entirely in your browser, so unreleased API payloads and config never leave your machine.
Frequently Asked Questions
How is this different from a normal text diff?
A text diff compares characters, so reordering keys or changing indentation registers as differences even when the data is identical. JSON Diff parses both documents first and compares the actual values, so it only flags genuine structural and value changes.
Does the order of keys matter?
For objects, no — keys are matched by name, so {"a":1,"b":2} and {"b":2,"a":1} are treated as equal. For arrays, order does matter, because elements are compared by their index position.
Why am I getting an "invalid JSON" error?
One of the two inputs is not valid JSON — often a trailing comma, a missing quote, or an unclosed bracket. Both sides must parse successfully before they can be compared; format each one in a JSON formatter first if you are unsure.
