JSON Diff
Compare two JSON objects and find differences instantly
How to Use
- Paste original JSON — Enter or paste the first JSON object into the left editor panel.
- Paste modified JSON — Enter or paste the second JSON object into the right editor panel.
- Compare — Click “Compare” to find all differences between the two JSON objects.
- Review results — Added fields are green, removed fields are red, changed fields are yellow, and unchanged fields are white. Each difference shows its dot-notation path.
Features
- Recursive deep comparison — Compares nested JSON objects and arrays at all levels with no depth limit.
- Color-coded results — Green for added, red for removed, yellow for changed, and white for unchanged fields.
- Dot-notation paths — Displays full path like
user.address.cityto easily locate changes in complex structures. - Manual compare — Click “Compare” to trigger the diff when you’re ready.
- 100% client-side — Your JSON data never leaves your browser — complete privacy guaranteed.
- Lightweight and fast — No server round-trips — results appear instantly.
Use Cases
- API debugging: Comparing two versions of a JSON response to find what changed between deploys.
- Config validation: Checking configuration file changes before deploying to production to spot unintended modifications.
- Code review: Reviewing pull requests that modify JSON-based data structures or schema files.
- Data analysis: Comparing two datasets exported as JSON to identify differences in records or fields.
Related Tools
- JSON Formatter — Validate, format, and beautify raw JSON strings into readable, indented structures.
- Diff Checker — Compare two blocks of plain text side by side with highlighted differences.
- JSON to CSV — Convert JSON arrays into comma-separated values for spreadsheet analysis.
- YAML to JSON Converter — Convert between YAML and JSON formats.
Frequently Asked Questions
How does the diff work with nested objects?
The diff tool recursively compares all levels of nested objects. When it encounters a nested object in both inputs, it drills down and compares each key within. Results use dot notation (e.g., 'address.city') to indicate the full path to changed values.
What counts as a change vs. added/removed?
A field is 'added' if it exists in the right JSON but not the left. It is 'removed' if it exists in the left but not the right. A 'changed' field exists in both but has different values. 'Unchanged' fields have identical values in both JSON objects.
How are arrays compared?
Arrays are compared as whole values using deep equality. If an array is modified in any way (different length, different elements), it is marked as 'changed.' The tool does not currently show element-level array diffs.
What happens if the JSON structure is different?
The tool handles structural differences gracefully. If a key in one object points to a nested object but the same key in the other object points to a primitive value, it is marked as 'changed' with both values shown.