JSON Compare

Compare two JSON objects and see the differences highlighted.

Left JSON
Right JSON
info

About JSON Compare

JSON Compare is a free online tool that takes two JSON documents and produces an exact, property-by-property diff in seconds. You paste or upload your JSON on the left and right sides, click Compare, and the tool walks every key, value, nested object, and array element recursively — marking each field as added (green), removed (red), modified (amber), or unchanged. A summary badge at the top tells you the total count of each change type at a glance.

The tool is built for the practical moments when you need to know precisely what changed between two versions of data: comparing an API response before and after a bug fix, reviewing what a configuration migration script actually modified, auditing the delta between two database export snapshots, or confirming that a data pipeline is transforming fields exactly as intended. Because the diff output is a structured tree rather than a raw text patch, you can expand or collapse nested sections and focus only on the changed paths without wading through hundreds of identical lines.

All processing runs entirely in your browser using JavaScript. Your JSON is never uploaded to a server, stored, or transmitted in any form, which means you can safely compare sensitive API payloads, internal configuration files, or confidential data exports without any privacy risk. The tool is free to use with no account required and no limits on how many comparisons you run.

star

Key Features

check_circle

Deep recursive diff

The comparison engine traverses every level of nesting — objects inside objects, arrays of objects, mixed structures — so no difference escapes detection no matter how deeply it is buried.

check_circle

Color-coded change tree

Added properties are highlighted green, removed properties red, and modified values amber. Unchanged properties are shown separately and can be toggled on or off to keep the view focused.

check_circle

Change summary badges

A summary bar shows the exact count of added, removed, and modified fields as soon as the comparison runs, so you can assess the scope of changes before reading the details.

check_circle

File upload support

Paste JSON directly into the editor or upload a .json file from disk on either side. Both inputs accept the same formats, making it easy to diff saved API responses or config exports.

check_circle

Swap inputs in one click

Reverse the comparison direction instantly with the Swap button — useful for checking the inverse diff or verifying that left and right produce symmetric results.

check_circle

100% client-side, no upload

Every comparison runs locally in your browser. No data leaves your machine, so you can safely compare internal configs, API secrets, and other sensitive payloads.

help

How to Use

01

Paste or Upload JSON

Enter your two JSON documents into the left and right editor panes. You can paste text directly or use the upload button to load JSON files from your computer.

02

Click Compare

Press the "Compare" button to run a deep comparison. The tool will parse both inputs and recursively diff every property, including nested objects and arrays.

03

Review Differences

Browse the color-coded diff tree below the editors. Green indicates added properties, red shows removed ones, and amber highlights modified values. Use the summary badges for a quick overview of total changes.

code_blocks

Example

Two versions of a user record are compared. The diff tree marks age and email as modified, phone and address.zip as added, and all unchanged fields as identical.

Left JSON (original)
{
  "name": "John Doe",
  "age": 30,
  "email": "john@example.com",
  "address": {
    "city": "Springfield",
    "state": "IL"
  },
  "active": true
}

— vs —

{
  "name": "John Doe",
  "age": 31,
  "email": "john.doe@example.com",
  "phone": "+1-555-0123",
  "address": {
    "city": "Shelbyville",
    "state": "IL",
    "zip": "62565"
  },
  "active": true
}
Diff result (summary)
3 differences found

  MODIFIED  age          : 30 → 31
  MODIFIED  email        : "john@example.com" → "john.doe@example.com"
  MODIFIED  address (2 properties)
    MODIFIED  city       : "Springfield" → "Shelbyville"
    ADDED     zip        : "62565"
  ADDED     phone        : "+1-555-0123"
  UNCHANGED name, state, active
lightbulb

Common Use Cases

  • arrow_circle_right

    Debugging changed API responses

    When an API endpoint starts returning unexpected data, paste the old and new response side by side to pinpoint exactly which fields changed, were added, or disappeared — without reading through hundreds of identical lines.

  • arrow_circle_right

    Reviewing configuration migrations

    After running a migration script on a JSON config file, compare the before and after snapshots to verify the script modified only the intended properties and left everything else intact.

  • arrow_circle_right

    Auditing data pipeline transformations

    Check that a data processing step is producing the correct output by comparing the raw input JSON against the transformed output and confirming each expected change is present and nothing extra was altered.

  • arrow_circle_right

    Catching regressions in test fixtures

    When a test fixture or snapshot file changes unexpectedly, compare the old version against the new one to understand which properties were affected and whether the change is intentional.

  • arrow_circle_right

    Validating database export deltas

    Compare two JSON exports of the same record at different points in time to produce an audit trail of what was modified between the two snapshots, down to the exact field level.

quiz

Frequently Asked Questions

What is JSON Compare? expand_more
JSON Compare is a tool that takes two JSON objects and performs a deep, recursive comparison to identify every difference between them. It categorizes changes as added (present only in the right JSON), removed (present only in the left JSON), or modified (value changed), then displays the results in an interactive diff tree.
Is my data secure when using this tool? expand_more
Yes. JSON Compare processes everything locally in your browser using JavaScript. No data is transmitted to any server, so your JSON content remains completely private and secure on your device.
Can it compare deeply nested JSON? expand_more
Absolutely. The comparison engine recursively traverses all levels of nested objects and arrays. It compares array elements by index and object properties by key, no matter how deep the structure goes.
What happens if I paste invalid JSON? expand_more
The tool validates both inputs before comparing. If either side contains invalid JSON, an error message will appear specifying which side has the syntax error and what the issue is, so you can fix it before re-comparing.
How does JSON Compare differ from JSON Formatter or JSON Validator? expand_more
JSON Formatter takes a single JSON input and re-indents it for readability. JSON Validator checks whether one JSON document is syntactically correct. JSON Compare is fundamentally different: it requires two JSON inputs and its purpose is to surface what changed between them, not to pretty-print or check syntax. Use Formatter when you need readable output, Validator when you need a syntax check, and Compare when you need to diff two documents.
How are arrays compared? expand_more
Arrays are compared by position (index). Element [0] in the left JSON is compared to element [0] in the right JSON, and so on. If the right array is longer, extra elements are shown as added. If the left array is longer, missing elements are shown as removed. This means reordering array elements will show as modifications, not moves.
Can I compare two JSON files instead of pasting text? expand_more
Yes. Each input pane has an upload button that lets you load a .json or .txt file directly from your computer. You can mix and match: upload a file on one side and paste text on the other.
Is there a limit on the size of JSON I can compare? expand_more
There is no fixed size limit. Because all processing runs in your browser, performance depends on your device. Very large documents with thousands of deeply nested properties may take a moment to process, but there is no artificial cap.