{ JSON Diff Tool }

// highlight added, removed, and changed keys between two JSONs

Compare two JSON objects side by side. Instantly highlight added, removed, and changed keys with a visual diff. Free, browser-based, no upload needed.

Ready to compare

Paste two JSON objects above and click Compare

HOW TO USE

  1. 01
    Paste JSON A

    Add your original JSON into the left input field.

  2. 02
    Paste JSON B

    Add the modified JSON into the right input field.

  3. 03
    Click Compare

    View highlighted diffs, summary, and flat key changes instantly.

FEATURES

Side-by-side View Deep Recursive Diff Added / Removed / Changed Flat Key Output Summary Report Array Order Option

USE CASES

  • 🔧 Debugging API response changes
  • 🔧 Auditing config file updates
  • 🔧 Reviewing data migration output
  • 🔧 Spotting accidental key deletions

WHAT IS THIS?

The JSON Diff Tool compares two JSON objects and highlights every difference: keys that were added, removed, or whose values changed. It supports deep nested objects and provides multiple view modes including visual side-by-side, a summary report, and a flat key list.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

What does the JSON Diff Tool do?

It compares two JSON objects key by key and highlights which keys were added (only in B), removed (only in A), changed (same key, different value), or unchanged (identical in both).

Does it support deeply nested JSON?

Yes. With the "Deep diff" option enabled (default), the tool recursively traverses nested objects and arrays to find differences at every level.

What does "Ignore array order" do?

When enabled, arrays are compared by their contents regardless of element order. This is useful when APIs return the same data sorted differently.

Is my JSON data sent to a server?

No. All diffing is performed entirely in your browser using JavaScript. Nothing is uploaded or stored. Your data stays private.

What are the three view modes?

Visual Diff shows color-coded side-by-side JSON. Summary lists each changed key with old/new values. Flat Keys shows all differences as dot-notation paths.

What if my JSON is invalid?

The tool validates both inputs before comparing. If either is invalid JSON, a clear error message shows exactly which input failed so you can fix it quickly.

What Is a JSON Diff Tool?

A JSON Diff Tool compares two JSON documents and pinpoints every difference between them. Instead of manually scanning hundreds of lines of JSON looking for the one field that changed, a diff tool does it instantly — highlighting added keys in green, removed keys in red, and modified values in yellow. This makes it indispensable for debugging API payloads, reviewing config changes, and validating data pipeline outputs.

💡 Looking for premium web development assets? MonsterONE offers unlimited downloads of templates, UI kits, and assets — worth checking out.

How Does JSON Diffing Work?

At its core, a JSON diff algorithm walks both objects simultaneously. For each key in Object A, it checks whether that key exists in Object B and whether the values match. Keys present only in A are marked removed; keys present only in B are marked added; keys present in both but with different values are marked changed; and keys that are identical are unchanged.

For deeply nested JSON, this process recurses into child objects and arrays. A shallow diff would report an entire nested object as "changed" even if only one inner field differed. A deep diff drills down, showing you the exact path and field that changed — far more useful in practice.

When Do Developers Need a JSON Diff?

There are several common scenarios where comparing JSON objects becomes critical:

Understanding the Color-Coded Visual Diff

Our visual diff mode shows both JSON objects side by side with line-level highlighting:

This color convention mirrors standard code diff tools like Git diff, making it immediately intuitive for developers.

Deep vs Shallow Comparison

A shallow comparison only looks at the top-level keys of an object. If a nested object changes internally, a shallow diff simply flags the entire parent key as "changed" without revealing which inner field was modified. This is fast but imprecise.

A deep (recursive) comparison traverses the entire object tree. If user.address.zip changes from "90210" to "90211", a deep diff reports that specific path rather than just noting user changed. This is the default mode in our tool because it provides the actionable detail developers actually need.

Flat Key Output for Automation

The Flat Keys view converts the diff results into dot-notation paths such as user.address.zip: "90210" → "90211". This format is easy to copy into documentation, paste into issue trackers, or process programmatically. It gives a compact, scannable summary of every change without the surrounding JSON structure.

Handling Arrays in JSON Diffs

Arrays are the trickiest part of any JSON diff. By default, arrays are compared index by index: [1, 2, 3] compared to [3, 2, 1] would show all three elements as "changed" even though the values are the same, just reordered.

The "Ignore array order" option sorts both arrays before comparing, treating them as sets. This is ideal when comparing API responses where the order of results isn't significant — for example, a list of user permissions or a collection of tags. However, for ordered data like log entries or steps in a process, you'll want order-sensitive comparison.

Privacy and Security

This tool runs entirely in your browser. No JSON data is transmitted to any server. There is no account required, no logging of inputs, and no data retention. This makes it safe to use with sensitive payloads like configuration secrets, user records, or internal API responses that you wouldn't want to send to a third-party service.

Tips for Better JSON Diffs