JSON Compare & Diff
Compare two JSON documents side by side, with changed lines highlighted, counts of what was added, removed and changed, and an option to ignore array order.
Comparison options
Key order never counts as a change, because JSON objects are unordered. Numbers compare by value with every digit kept, so 1.0 equals 1 but two 19-digit IDs that differ in the last digit do not. Arrays are aligned, so an inserted element shows as one addition rather than a shifted list.
Paste two documents, open two files, or load the example. To check one document for errors first, use the JSON validator.
How to Compare JSON
Paste the original JSON on the left and the modified version on the right, or open a file or a URL into either side. The comparison runs as you type. Lines that differ are highlighted in both editors, red for removed, green for added and amber for changed, and the counts sit above the editors. Prev and Next step through the differences one at a time. If either side is minified, press Format both first, so that each value sits on its own line and the highlights point at exactly what changed.
Understanding the Output
Under the editors, every difference is listed by path. Removed means the path exists only in JSON 1; added means it exists only in JSON 2; changed means both have it with different values, and both values are shown. When array alignment moved an element, the entry shows both positions, such as $.items[2] → $.items[3]. Copy report produces the same list as plain text, with [-], [+] and [~] markers, ready for a ticket or a code review.
What Counts as a Difference
A JSON diff should report changes in meaning, not in formatting. Whitespace and indentation never count. Key order never counts, because JSON objects are unordered. Numbers compare by value with full precision, so 1.0 equals 1 while 9007199254740993 does not equal 9007199254740992. Array order counts unless you tick Ignore array order, because in most JSON an array's order is data, such as steps, rankings or a time series. If a document repeats a key, the comparison uses the last occurrence, which is what JSON.parse and most libraries keep.
When to Use JSON Compare
Use JSON comparison when reviewing API response changes, debugging configuration differences, comparing database records, or validating data transformations.
Common Use Cases
Developers use JSON comparison for code reviews, testing API changes, debugging data sync issues, comparing environment configurations, and validating migration scripts.
Frequently Asked Questions
Does it show a diff by key path?
Yes. Besides highlighting the changed lines in both editors, every difference is listed by its JSONPath, such as $.users[0].email, so a change deep inside a nested object is named precisely rather than shown as a whole-object replacement. Each entry is marked as added, removed or changed, and clicking it scrolls both editors to that spot. Copy report gives the same list as plain text.
What differences does this tool detect?
The tool detects three types of differences: added keys (present in JSON 2 but not in JSON 1), removed keys (present in JSON 1 but not in JSON 2), and changed values (same key but different values).
Does it compare nested objects?
Yes, the comparison is deep. Differences at any depth are reported with their full path, for example $.user.address.city, and highlighted on the lines where they sit.
How are array differences handled?
By default arrays are aligned element by element, the way a text diff aligns lines, so inserting one item at the start shows as a single addition instead of every later item appearing changed. An element that was edited in place shows its inner change. Turn on Ignore array order to treat every array as an unordered collection: [1, 2, 3] and [3, 1, 2] are then equal, and only elements with no match on the other side are reported, as removed or added.
Are 1.0 and 1 treated as the same number?
Yes. Numbers are compared by value, so 1, 1.0 and 1e0 match, and string escapes are decoded, so \u00e9 matches é. Unlike tools built on JSON.parse, every digit is kept: two 19-digit IDs that differ only in the last digit are reported as different, not silently rounded to the same value.
Can I send a comparison to someone?
Yes. Copy share link puts both documents in the link, after the #. Browsers never send that part of a URL to a server, so nothing is uploaded; the documents travel inside the link itself. Links hold up to 8,000 characters of compressed data, and anyone with the link can read both documents.
Is the order of keys considered?
No, JSON key order is not significant. Two objects with the same keys and values in different orders are considered equal.
Continue with the data, not the directory
Validate, format, repair, compare, query, and reshape payloads before they ship.
JSON to YAML Converter
Validate JSON, control YAML formatting, compare option changes, and export configuration-ready output locally in your browser.
JSON Merge
Deep-merge two JSON documents with the second overriding the first, key by key.
JSON Validator
Check whether JSON is valid, with any error highlighted at its exact line and column, a plain explanation, and one-click repair.
JSON Formatter & Beautifier
Format and beautify JSON with 2, 3 or 4 spaces or tabs, see any syntax error at its exact line and column, and repair common mistakes in one click.