JSON Diff

JSON Diff

JSON diff checker online to compare two JSON objects side by side. Highlights added, removed, and changed values instantly in your browser.

Left JSON

1 line

Loading editor...

Right JSON

1 line

Loading editor...

Features

  • Side-by-side and inline diff views
  • Structural JSON comparison
  • Highlights added, removed, and changed values
  • Ignore key order option
  • Auto-comparison on input
  • Clear visual indicators for differences

Common Use Cases

  • Compare API responses before/after changes
  • Track configuration file changes
  • Verify data transformations
  • Debug data synchronization issues
  • Review JSON updates before deployment

Understanding JSON Diff

JSON diff compares two JSON objects to find structural differences. Unlike text diff, it understands JSON structure and can ignore key ordering.

Types of changes detected:

  • Added - New properties or array elements
  • Removed - Deleted properties or elements
  • Changed - Modified values (shows old β†’ new)
  • Type changes - Same key, different data type

Key order: You can choose to ignore key order when comparing objects, treating {"a":1,"b":2} as identical to {"b":2,"a":1}.

Examples

Valid - Identical objects
Left:  {"name": "John", "age": 30}
Right: {"name": "John", "age": 30}
Result: No differences
Invalid - Changed value
Left:  {"version": "1.0.0"}
Right: {"version": "2.0.0"}
Result: version changed from "1.0.0" to "2.0.0"
Invalid - Added property
Left:  {"name": "John"}
Right: {"name": "John", "email": "john@example.com"}
Result: email added

Frequently Asked Questions

What does "ignore key order" do?

It treats objects with the same keys but different order as identical. Example: {"a":1,"b":2} equals {"b":2,"a":1}.

Can I compare large JSON files?

Yes, but very large files may take longer to compare. For files over 5MB, consider using a desktop diff tool.

What's the difference between side-by-side and inline?

Side-by-side shows old and new values next to each other. Inline stacks them vertically with +/- indicators.

Does it work with nested objects?

Yes! It recursively compares nested objects and arrays, showing the full path to each difference.

Can I export the diff results?

You can copy the visual diff displayed on screen. For programmatic use, consider using a JSON diff library in your code.

```