Free Online JSON Diff & Compare Tool

Compare two JSON objects side by side. See added, removed, and changed values highlighted.

Try It Now
0 Added 0 Removed 0 Changed
No differences found
Path Type Old Value New Value

Need to explore JSON structure? Use the full editor with tree view, TypeScript generation, and URL sharing.

Open Full Editor

What is JSON Comparison?

JSON comparison (or "diff") is the process of identifying differences between two JSON objects. This is essential for:

Features

🔍
Deep Comparison
Recursively compares nested objects and arrays to identify all differences at any depth.
🎨
Color-Coded Results
Added, removed, and changed values are highlighted in distinct colors for easy scanning.
Lenient Parsing
Handles trailing commas and comments in JSON, making it more forgiving than strict JSON.
🔒
100% Private
All comparisons happen in your browser. Your data never leaves your device.
📍
Detailed Path Info
Each difference shows the exact path to the modified value for precise navigation.
No Installation
Free, online tool with no sign-up required. Works on any device with a modern browser.

How It Works

The comparison algorithm uses recursive deep comparison to examine both JSON objects:

  1. Parse: Both JSON strings are parsed into JavaScript objects (with support for lenient syntax)
  2. Traverse: The algorithm recursively walks through both object trees simultaneously
  3. Categorize: Each difference is categorized as added (exists only in right), removed (exists only in left), or changed (different values)
  4. Track Path: The full path to each difference is recorded (e.g., config.theme or features[3])
  5. Display: Results are presented in a table with color coding and truncated value previews

The algorithm handles:

Related Tools