JSON Diff Checker
Compare two JSON documents semantically — key order never matters — and see every changed, added or removed path in a table. Runs in your browser.
Worked examples
- A nested value changed, keys reordered
Key order never matters for JSON — this pair differs only in a single nested value, and reordering the top-level keys produces no false changes.
- A field added and an array element appended
A common API-response comparison: a new field was introduced and an array grew by one entry, both reported with their exact path.
- Two identical JSON objects
Confirms two configs are equivalent even when whitespace or formatting differs, since comparison happens on the parsed values, not the raw text.
What this tool does
This tool compares two JSON documents semantically rather than as raw text — it parses both sides, then walks the resulting values and reports every path where they differ, whether that's an added field, a removed field, or a changed value. Because comparison happens on the parsed structure, reordering keys or reformatting whitespace never shows up as a false change.
When you need it
- Comparing two versions of an API response to see exactly which fields changed between a staging and production call, without scrolling through a wall of near-identical JSON.
- Reviewing a configuration file before and after an automated tool reformatted it, to confirm the reformatting didn't silently change a value.
- Diffing two exported records — a user profile, a feature flag set, a settings object — pulled from a database at different points in time.
- Debugging why two supposedly identical payloads behave differently in code, by finding the one nested field that actually differs.
How paths are reported
Each row in the results table shows a JSON path like user.address.city for an object field or tags[2] for an array element, along with whether that path was added, removed or changed, and its value on each side. Nested objects are walked recursively, so a single differing field deep inside a large document is reported at its exact location rather than requiring you to diff the entire parent object by eye.
Why key order never matters
JSON objects are unordered by definition — {"a":1,"b":2} and {"b":2,"a":1} represent the same data. This tool sorts keys before comparing, so a value that only moved position in the source text, or an object reformatted by a different serializer, correctly reports zero changes. If you need to know whether the raw text changed byte for byte, including key order and whitespace, use a plain text diff instead — this tool intentionally ignores that.
How arrays are compared
Array elements are compared by index: the value at position 0 in "before" is compared against position 0 in "after", and so on. This means inserting an element in the middle of an array will show every element after the insertion point as "changed" rather than correctly recognizing an insertion, since index-based comparison has no way to detect that the array shifted. For arrays where element identity matters more than position — a list of records with an id field — comparing them as separate JSON documents keyed by id, or using the CSV diff tool if the data is tabular, will give a clearer result.
Numbers and key names
Values are parsed with the browser's standard JSON parser, so numbers are held as double-precision floats: 1.0 and 1 are the same value, but two integers larger than 9,007,199,254,740,991 (2^53 - 1) that differ only in their last digits may parse to the same number and be reported as identical. If you are comparing 64-bit IDs, quote them as strings first. Paths are joined with dots, so a key that itself contains a dot ("a.b") is displayed the same way as a nested a then b.
Limits
Each side is capped at 2 MB of JSON text. If either document fails to parse, the tool reports which side failed and the parser's exact error message, rather than attempting a partial comparison on invalid data.
Frequently asked questions
- Is my JSON uploaded anywhere?
- No. Both documents are parsed and compared entirely in your browser; nothing is sent to a server.
- Does key order affect the result?
- No — this is a semantic diff. Keys are compared by name and value, not by position, so reformatting or reordering an object produces no reported changes.
- What happens if one side isn't valid JSON?
- The tool reports which side failed to parse and why, instead of guessing at a partial comparison.
- How are array differences reported?
- Array items are compared by index and shown as paths like tags[2] — appending an item shows as one added path rather than rewriting the whole array.