Shard Tools

JSON Diff

Compare two JSON documents and see every changed path without uploading private payloads.

Maintained by Roshan.

Browser-local JSON comparison

Use JSON Diff

Objects are compared by key, arrays by position, and every difference is reported with a JSON path. Key order does not create false changes.

Comparison result

Paste two JSON documents to compare their values and structure.

Explore developer and data tools

Find related browser-local tools for nearby tasks without starting another search.

Browse all developer and data tools

About JSON Diff

A JSON diff answers a more useful question than a text diff: what changed in the data? Two API responses can contain the same object keys in a different order and look completely different line by line even though they mean the same thing. Conversely, one value can change from the number 1 to the string "1" and look harmless while breaking validation or application logic. This tool parses both documents first, then walks their actual structure. Objects are matched by key, arrays are compared by position, and each result carries a JSON-style path such as $.customer.address.city or $.items[3].price. Added keys, removed keys, changed values, and changed types are counted separately, so a large response can be reviewed from a compact list instead of by scanning two walls of text. Both documents remain in browser memory and are never posted to a comparison service.

Work through the input

  1. Paste the original document on the left and the changed document on the right. Each side must be valid JSON before comparison begins. Objects, arrays, strings, numbers, booleans, and null are all valid roots; JavaScript object literals with comments, single quotes, or trailing commas are not JSON and are rejected honestly.
  2. Choose Compare JSON. The tool recursively examines the parsed values rather than their whitespace. Object property order is ignored because JSON objects are unordered collections of names and values. Array order remains significant because moving an array item changes its position and often changes its meaning.
  3. Read the path on each result. A dot path names ordinary object keys, brackets name array positions, and unusual keys containing punctuation are quoted in brackets. Added means the path exists only in the changed document; removed means it exists only in the original; changed means the type stayed the same but the value differs; type means the value changed category, such as number to string.
  4. Use the summary to estimate the size of the change, then inspect the individual original and changed values. Long objects and arrays are shortened in the visible report so a single branch cannot overwhelm the page. The comparison still occurs against the complete parsed value.
  5. Copy report creates a plain-text audit list with the change type, path, original value, and changed value. The browser limits the displayed report to the first 500 differences to keep a mistaken comparison of enormous payloads responsive; compare a narrower branch when that ceiling is reached.

When json diff is useful

Comparing API responses between releases

Put yesterday's response on the left and the new deployment's response on the right. A renamed property appears as one removal and one addition, while a number accidentally serialized as text is called out as a type change at the exact path.

Reviewing a configuration change

Compare the committed configuration with the proposed version. Reordered keys disappear as noise, leaving changed feature flags, added endpoints, removed permissions, and modified nested values in a focused list.

Checking two webhook deliveries

A path-aware diff separates expected event-specific values from an unexpected missing field. Because processing is local, customer identifiers and internal URLs do not need to be copied into a third-party diff service.

Check the output

Questions about JSON Diff

Does JSON key order affect the comparison?

No. Object keys are matched by name, so reformatting or reordering an object does not create changes. Array order does matter because JSON arrays define values by their position.

What is the difference between changed and type changed?

Changed means both values have the same JSON type but different content, such as 10 becoming 12. Type changed means the category differs, such as the number 10 becoming the string "10", an object becoming an array, or a value becoming null.

Are my JSON documents uploaded?

No. Parsing and recursive comparison happen in browser memory. This page does not call an API with your JSON; you can verify that in the browser Network panel.

Can it compare JSON files instead of pasted text?

This first version accepts pasted JSON so the two inputs remain explicit and easy to edit. A local file picker can be added later without changing the comparison engine or introducing an upload.

Related tools

JSON Unescape and Escape

Unescape JSON strings or create valid JSON escapes locally. Remove one encoded string layer, handle Unicode safely, and reject malformed sequences.

JSON Formatter and Validator

Format, minify, and validate JSON locally in your browser. Inspect keys, values, nesting depth, and root type without sending private API data to a server.

JSON Validator

JSON Validator in your browser. Instant, accurate, and nothing is uploaded.

JSON to CSV Converter

Convert JSON objects to UTF-8 CSV in your browser. Union columns, quote values, and protect formula-like strings.

YAML to JSON Converter

Convert YAML to JSON or JSON to YAML in your browser. Handles multi-document files, follows YAML 1.2, and uploads nothing.

XML to JSON

Convert XML to readable JSON in your browser. Attributes, repeated tags and mixed content are all handled predictably.

JSON to JSON Schema

Generate a JSON Schema from a sample document in your browser, inferring types and required fields.