ToolHub
Open Tool

JSON Diff

Compare two JSON objects and highlight differences with deep comparison and path-based diff output

Developer Tools

About This Tool

JSON Diff is a browser-based comparison tool that performs deep recursive comparison of two JSON objects. It identifies added, removed, and modified properties with full path tracking, color-coded diff output, and statistics. You can optionally ignore array order for more flexible comparisons.

Key Features

Quick Preview

Use Cases

json diff comparison

Frequently Asked Questions

How does the comparison algorithm work?

The tool uses a recursive deep comparison algorithm that traverses JSON objects and arrays field by field. For nested objects, it recursively compares each property; for arrays, it compares elements by index. Differences are displayed with their full path (e.g., address.city).

How are arrays compared?

By default, array elements are compared by index order. When the Ignore Array Order option is enabled, the tool sorts primitive arrays before comparing, which is useful when element order doesn't matter. Object arrays are still compared by index.

How are diff results displayed?

Differences are categorized into three types: added (green, + marker), removed (red, - marker), and modified (yellow, ~ marker showing old→new value). Each diff shows the full path, operation type, and value change, with a summary at the top.

Is my data safe when using this tool?

Absolutely. All JSON parsing and comparison happen locally in your browser. No data is uploaded to any server, keeping your data completely private.

Can I copy the diff results?

Yes. Click the Copy Diff Result button to copy the differences in text format to your clipboard, including the summary statistics and each diff's path, operation, and values — convenient for pasting into documents or chat.