Guides · Utiltown
JSON Diff Guide: Compare JSON Files Semantically
JSON is everywhere — API responses, configuration files, lockfiles, and manifests. When two versions of a JSON file differ, finding the exact change by eye is slow and error-prone. JSON diff solves this by comparing parsed structures semantically and reporting only the real delta: added keys, removed keys, changed values, and nested structural differences.
This guide explains how JSON diff works, why it beats plain text diff for structured data, how arrays are handled, and how to use Utiltown\'s JSON Diff tool to compare documents locally in your browser.
Core Concepts
- Semantic comparison: JSON diff parses both documents
first, so key order, whitespace, and indentation never produce false
positives.
{"a": 1, "b": 2}and{"b": 2, "a": 1}are treated as identical. - Change types: additions (new key or item), deletions
(removed key or item), and modifications (same key, different value).
Nested objects are diffed recursively, so you see the full path to each
change, for example
user.settings.themechanged from"light"to"dark". - Arrays: arrays can be compared as ordered sequences or as unordered sets. Ordered mode flags reordering as changes; set mode only reports membership differences. Pick the mode that matches your data semantics — configuration lists often matter by order, while tag lists usually do not.
How to Use This Site\'s Tool
- Open JSON Diff.
- Paste the original JSON into the left panel and the new JSON into the right panel.
- Choose ordered or unordered array comparison based on your data.
- Review the highlighted delta: green for additions, red for deletions, and yellow for modifications.
- Copy the diff result or export it for documentation and code review.
Bottom Line
Stop hunting through raw JSON for a single changed field. Run a semantic diff at JSON Diff, see exactly what changed, and move on — locally, privately, and instantly.
Frequently Asked Questions
What is JSON diff?
JSON diff compares two JSON documents and shows exactly which keys, values, array items, or nested structures changed between them. Instead of re-reading the whole file, you see a focused delta: additions, deletions, and modifications, often with paths pointing to the changed field.
Why not just use a text diff tool?
Text diff works line by line and does not understand JSON structure. Reordering object keys or reformatting whitespace triggers false positives even though the data is identical. A JSON diff compares parsed structures semantically, so key order and whitespace do not create noise.
Does array order matter?
It depends on the tool. Some JSON diffs treat arrays as ordered sequences, so moving an item counts as a delete plus an add. Others treat arrays as sets and report only membership changes. Check the tool settings before interpreting array diffs.
Is my JSON data uploaded?
No. This site's JSON diff runs entirely in the browser. Both inputs are parsed and compared locally, and nothing is sent to a server.
What is JSON diff good for?
Reviewing API response changes, validating config migrations, detecting accidental edits in lockfiles or manifests, and unit-testing serialization output. It is especially useful when reviewing pull requests that touch structured data.