JSON Compare
Runs 100% in your browserCompare two JSON objects or files online — see every added, removed, and changed value with JSONPath, before/after previews, filters, search, and a downloadable report. 100% private.
Original JSON document
Updated JSON document
Comparison report
Load two valid JSON documents to begin.Your grouped JSON comparison will appear here.
100% private — both documents stay in your browser
JSON is parsed and compared locally using browser-native JSON.parse and JavaScript object traversal. No data is uploaded to any server, no document is persisted in localStorage. Clipboard access and shared-device privacy remain separate considerations.
Recent comparisons disappear when this page closes.
Frequently asked questions
JSON Compare parses two JSON documents — an original and an updated version — and produces a grouped structural report showing every added, removed, and changed value. Unlike a plain text diff, it compares parsed data so whitespace, indentation, and key order do not create false differences. Each change is identified by its JSONPath so you can locate it in a large document instantly.
Paste the original JSON into the Before panel and the updated JSON into the After panel, or click Open file to load local .json files directly. Click Compare JSON to generate the grouped report. ToolsSonic parses both documents in your browser and produces the result with no upload and no server round-trip.
Added means a path exists in the updated document but not in the original. Removed means it exists in the original but has been deleted in the update. Changed means the path exists in both documents but the value or data type differs. These three categories cover every meaningful structural difference between two JSON documents.
Yes. The tool recursively walks both documents and reports nested differences with JSONPath notation such as $.user.address.city or $.settings.notifications.email. This makes it easy to find changes buried inside deeply nested configuration objects, API responses, or database exports.
Yes. Array elements are compared by index and reported with paths such as $.items[0] and $.roles[2]. Enable Ignore array order when the array represents an unordered collection — for example a list of permission names or feature flags — so reordering does not count as a difference.
JSON Compare is designed for before-and-after document review: two clear panels, grouped added/removed/changed results, and a downloadable comparison report. JSON Diff is designed for detailed structural analysis with path-aware reporting, scope filtering, and advanced array-order handling. Use JSON Compare for quick document reviews; use JSON Diff when you need granular control over the comparison.
Yes. Copy the response body from two API calls — before and after a deployment, or from two environments — into the Before and After panels. The comparison shows new fields, removed fields, changed values, and type changes. This is a fast way to catch unintended API changes before they reach production.
Yes. Treat type changes as differences is enabled by default. A value that changed from the string "true" to the boolean true, or from the number 1 to the string "1", is reported as changed. Disable this option when you only want to compare values regardless of their JSON type.
Yes. Use the Show filter to display all changes, added values only, removed values only, or changed values only. Use the search field to filter rows by path text or value content. Both filters work together so you can narrow a large comparison to exactly the paths you care about.
Yes. Paste a production config as the original and a staging or development config as the updated document. The comparison immediately shows which keys differ between environments — missing feature flags, changed connection strings, added debug settings — without manually scanning two formatted documents side by side.
The comparison requires both documents to be valid JSON. If either fails to parse, the tool shows an Invalid JSON status badge on that panel, clears the results, and disables the Copy and Download buttons. Fix the syntax error — missing quotes, trailing commas, unmatched brackets — or use JSON Repair first, then run the comparison again.
Yes. After a successful comparison, Copy report places the plain-text report on the clipboard and Download report saves it as json-comparison-report.txt. The report lists the status, added/removed/changed counts, and every changed path with its before and after values. Export is disabled until both documents parse successfully.
Yes. Swap documents exchanges the Before and After panels and re-runs the comparison. A value that was Added in one direction becomes Removed in the other. This is useful when you want to review the same change from the opposite perspective.
Yes. Both documents are parsed and compared using browser-native JSON.parse and in-memory JavaScript object traversal. The tool makes no network calls, does not upload either document, and does not store inputs in localStorage. Session history is kept only in page memory and disappears when the tab closes.
Yes. Paste the expected fixture as the original and the actual output as the updated document. Any unexpected field addition, value change, or key removal appears in the report immediately. This is useful for manual regression checks before committing generated output, verifying API mocks, and reviewing serialization changes between library versions.
Compare answers the question are these two documents equal — ignoring formatting and key order — and summarises any mismatches. Diff shows you the full change view: every added, removed, and modified value laid out for review. Use Compare for a verdict, Diff for the details.
What is JSON Compare?
What Is JSON Compare?
A JSON Compare tool takes two JSON documents — an original and an updated version — and produces a structured report of every difference between them. Unlike a line-oriented text diff that flags whitespace and indentation changes, a JSON Compare tool parses both documents first and compares the underlying data. Two JSON files that contain the same data with different indentation, different key order, or different spacing produce a result of "Identical" rather than a false list of line-level changes.
ToolsSonic's JSON Compare identifies three categories of change:
- Added — a path exists in the updated document but not the original - Removed — a path exists in the original but has been deleted in the update - Changed — the path exists in both documents but the value or data type differs
Every change is reported with its full JSONPath (such as $.user.address.city or $.items[0].price) and a before/after value preview, making it fast to locate exactly what changed in a large or deeply nested document.
Why Structural JSON Comparison Beats Text Diff
A standard text diff shows line-level differences. If you reformat a JSON file from 4-space to 2-space indentation, a text diff reports hundreds of changed lines even though no data changed. If you reorder two keys in an object, a text diff reports those lines as removed and added. These visual artefacts slow down code review and make it easy to miss a genuine data change buried among formatting noise.
JSON Compare solves this by operating on parsed data. Reindentation, whitespace changes, and key reordering are invisible to a structural comparison. Only genuine data differences — new fields, deleted fields, changed values — appear in the report.
Common Use Cases
API response comparison — Copy the response body from two API calls (before and after a deployment, or from two environments) into the Before and After panels. The comparison reveals new fields added by a new API version, fields removed by a deprecation, and changed default values — exactly the information you need for release notes and contract reviews.
Configuration drift detection — Compare a production config with a staging config to find which keys differ. Missing feature flags, changed connection strings, added debug options — all appear instantly without scanning two formatted documents side by side.
Regression testing — Paste an expected JSON fixture as the original and the actual test output as the updated document. Any unexpected field, missing property, or changed value triggers a visible diff row. This makes manual regression checks fast and auditable before committing generated output.
Webhook payload review — When an external service changes its webhook format, compare an old payload with a new one to document exactly what the provider added, removed, or changed. Update your integration without guessing.
Database export verification — Compare two JSON exports of the same data set to confirm that a migration, transformation, or export script produced the expected result. The comparison reports tell you definitively whether the data is equivalent.
Type Comparison and Array Order
Type-sensitive comparison is enabled by default. A value that changed from the string "1" to the number 1, or from the string "true" to the boolean true, is reported as a changed value. This catches type coercion bugs that a string comparison would miss. Disable it when your workflow intentionally treats JSON strings and numbers as equivalent.
Array order ignoring compares arrays as unordered collections. Enable this option when the array represents a set of values — a list of roles, a list of feature flags, a permission list — where order carries no meaning. When array order matters (sorted results, indexed records, ordered sequences), keep the default ordered comparison.
Privacy and Security
ToolsSonic's JSON Compare runs entirely in your browser. Both documents are parsed with the browser-native JSON.parse API and compared with in-memory JavaScript object traversal. The tool contains no fetch, no XMLHttpRequest, and no WebSocket calls. Your JSON — API responses with authentication tokens, configuration files with credentials, database exports with personal data — never leaves your device.
Session history records only summary statistics (added/removed/changed counts and a timestamp). It never stores the document content and disappears when the tab closes.
Common use cases
- Comparing API responses before and after a deployment to detect unintended changes
- Detecting configuration drift between production and staging environments
- Verifying JSON fixture output matches expectations in regression tests
- Reviewing webhook payload changes when an external service updates its format
- Comparing database JSON exports before and after a migration or transformation
- Auditing feature-flag or remote-config changes between releases
- Checking nested object and array changes in complex API contracts
Why use ToolsSonic's JSON Compare?
ToolsSonic's JSON Compare beats jsoncompare.com and diffchecker.com by operating on parsed data rather than text lines — formatting changes produce zero false positives. It adds JSONPath for every change row, before/after value previews with colour coding (red=before, green=after), a 5-cell stats strip, type-sensitive comparison, ignore-array-order toggle, filter by change kind, path/value search, session history, copy + download report, and full dark mode. Everything runs locally with no upload.
Related tools
JSON Diff
Editor's choiceCompare two JSON documents locally with path-aware added, removed, and changed reporting for nested objects, arrays, and primitives — both inputs stay in your browser.
JSON Formatter
Editor's choiceFormat, beautify, minify, and validate JSON locally. Choose indentation, sort keys, preserve Unicode, inspect statistics, and copy or download clean output.
JSON Validator
Editor's choiceValidate JSON online with precise line and column diagnostics, targeted repair hints, structure inspection, and browser-only processing — no upload, no account.
JSON Editor
Editor's choiceEdit JSON online in a private browser-based editor with line numbers, live validation, syntax-aware formatting, key sorting, Unicode support, search, and local export — nothing uploaded.
JSON Viewer
Editor's choiceView JSON online in an interactive collapsible tree with 6 type badges, 4-scope search, JSON path inspection, structure statistics, and browser-only processing — no upload, no account.
JSON Repair
Editor's choiceRepair broken JSON in your browser with conservative, transparent fixes for trailing commas, comments, single quotes, and bare keys — review every change, export only when valid.