JSON Diff Viewer - Compare Two JSON Documents
Developer Tools
Compare JSON documents side by side. Find nested changes, open local files, copy JSON Pointers, and export a browser-generated JSON Patch.
"Alice""Alice"30to31"admin""New York"to"Boston""10001"to"02101""alice@example.com"How to use this tool
- Add the original JSON. Paste JSON into the left editor, choose Open .json, or drop a .json file onto the original pane. Files are read locally and are limited to 10 MiB.
- Add the modified JSON. Paste, open, or drop the second JSON document into the right editor. The tool parses both documents as you edit them and reports syntax errors beside the affected input.
- Review changes and paths. Inspect added, removed, changed, and type-changed rows. Expand or collapse nested objects, hide unchanged values recursively, and copy a JSON Pointer to a changed value.
- Copy or download a patch. Open the JSON Patch tab to copy or download RFC 6902 operations that transform the original document into the modified document. Changed arrays are replaced as a whole.
What is a JSON diff?
A JSON diff compares two parsed JSON documents and highlights which values were
added, removed, changed, or left
unchanged. Unlike a plain text diff, it compares data structures rather than
raw lines, so indentation and object-key order do not create false changes. Paste text into
either editor, open a local .json file, or drop one onto its matching pane; both documents
stay in your browser.
How to use this tool
- Paste or open the original JSON in the left editor.
- Paste or open the modified JSON in the right editor.
- Review the live tree, expand nested objects, or hide unchanged values.
- Copy a JSON Pointer for a change or open the JSON Patch tab to export operations.
Status indicators
- + added: The key exists only in the right document.
- − removed: The key exists only in the left document.
- ~ changed: The key exists in both, but the value differs.
- ⚡ type: The key exists in both, but its JSON type changed (for example,
number -> string or
null-> object). Type changes are included in the overall changed count.
Semantic vs. syntactic diff
A plain text diff treats JSON as lines of text and reports line-level changes. If a large JSON
object is reformatted (different indentation or key reordering), a text diff can show many
lines as changed even when the actual data is identical. This viewer parses both documents and
recursively compares values. A path such as /address/city is a JSON Pointer; click
a path beside a changed row to copy it for a code review, test assertion, or follow-up query.
Deep equality and array order
JSON arrays are ordered sequences: ["a","b"] and
["b","a"] are different values, so this tool compares array entries by index. That
behavior is useful for ordered API results, event sequences, and test fixtures. Some collections,
such as a set of tags, may be conceptually unordered; this viewer does not guess that intent or
offer an ignore-order mode. For a safer exported patch, any changed array is replaced as one value
rather than emitting index operations that could be invalidated by insertions or removals.
Common use cases
- Comparing API responses between environments (dev vs. prod)
- Reviewing configuration file changes
- Debugging why a test fixture no longer matches
- Auditing changes to JSON-based data exports
Privacy
Pasted text and files opened with the file picker or drag-and-drop are processed locally with the browser's JSON parser. The file reader has a 10 MiB limit, and this page does not fetch remote URLs or upload document contents. The generated patch is also built in the browser; use care when copying or downloading a patch because it can contain values from the modified document.
Frequently asked questions
Does this JSON diff viewer upload my data?
No. Pasted JSON and files opened from your device are parsed and compared in this browser. The tool does not send document contents to a server.
How does the tool decide whether values changed?
It parses both inputs as JSON and compares values recursively. Object key order and whitespace do not matter. JSON types do matter, so null changing to an object is marked as a type change.
Are array items matched by their values or IDs?
Arrays are compared by index because JSON arrays are ordered. The JSON Patch export replaces a changed array as a whole, avoiding ambiguous operations when items shift position.
What is the path shown beside each changed row?
It is a JSON Pointer, the RFC 6901 path from the document root. For example, /profile/name identifies the name property inside profile. Click a path to copy it.
Related tools
- Text DiffUse a line-based text diff when whitespace and exact text placement matter.
- JSON FormatterFormat or validate either JSON document before reviewing its structural changes.
- JSON Path TesterTest a JSONPath expression when you need to select values from a JSON document.
- JSON Schema ValidatorCheck whether a document still matches its required JSON Schema.
- JSON ↔ YAMLConvert JSON configuration to YAML or compare it with a YAML version.
- JSON ↔ XMLConvert JSON payloads to XML or inspect an XML version of the same data.
- CSV to JSONTurn a tabular CSV export into JSON records before comparing the data.