JSON Diff Tool

Use the json diff tool online for quick developer workflows. Add examples, caveats, and avoid pasting sensitive secrets.

Free online file converter tool. Works in Chrome Firefox Safari Edge Opera and other modern browsers on Windows macOS Linux Android and iOS. No software installation required. All processing happens directly in your browser, so your files never leave your device. Completely free to use with no account needed.

JSON Diff Tool

Compare two JSON documents and see all differences highlighted instantly.

JSON Diff Features

Deep comparison of JSON structures with clear difference highlighting.

Deep Comparison

Recursively compares nested objects and arrays.

Color Coded

Added in green, removed in red, changed shows both values.

Array Diff

Detects additions, removals, and changes within arrays.

How to Compare Two JSON Documents

  1. Paste both versions

    Put the original document in the JSON A box and the changed document in the JSON B box. Each side is parsed on its own, so a syntax problem in one input does not block the other. Minified and pretty-printed JSON both work, since whitespace and indentation are ignored.

  2. Run the comparison

    Click Compare. The tool parses both inputs with the browser JSON parser and walks the two structures key by key and element by element. If either side is not valid JSON, the status line shows which side failed and the exact parser message so you can fix it.

  3. Read the diff and counts

    Differences are listed by path with a leading sign: minus for removed keys, plus for added keys, and a tilde with the old value, an arrow, and the new value for changed values. The legend and the summary line report how many entries were unchanged, modified, removed, and added.

What Each Change Type Means

Every leaf in the two documents is sorted into one of four states. The tool walks objects and arrays recursively, so the same rules apply at any nesting depth. The path for each entry uses dot notation for object keys and square brackets for array positions, for example user.roles[2].

Change typeMarkerWhat triggers itShown value
Addedplus signA key or array element exists in JSON B but not in JSON AThe new value
Removedminus signA key or array element exists in JSON A but not in JSON BThe old value
ModifiedtildeSame path, different value, or a different data typeOld value, then new value
UnchangednoneSame path and identical value on both sidesThe shared value
Type shifttildeOne side is an object or array and the other is notCounted as modified at that path
Array lengthplus or minusOne array is longer than the otherExtra elements added or removed by index

When This Tool Fits Your Task

Reviewing config changes

Paste the old and new versions of a settings file to see exactly which keys were added, dropped, or retuned before you ship them. Object key order does not affect the result, so reformatted files still compare cleanly.

Checking API responses

Drop two captured responses side by side to spot a renamed field, a removed property, or a value that changed type from a number to a string. The path notation points you straight to the affected location.

Comparing ordered lists

Good for arrays where position is meaningful, since elements are matched by index. If two arrays hold the same items in a different order, expect them to show as changes rather than as a match.

Quick local checks

The comparison runs in your browser with no upload and no sign-up, so it suits a fast structural check. For very large documents or commit-level history tracking, a dedicated diff in your editor or version control may serve better.

Common Problems and Fixes

One side reports invalid JSON

The status line names the failing side and shows the parser message. Common causes are trailing commas, single quotes instead of double quotes, unquoted keys, or a stray comment. Fix the reported spot and compare again.

Reordered arrays show as differences

Arrays are compared by position, not by content. The same elements in a different order are reported as changes. Sort both arrays the same way before pasting if order is not meaningful for your data.

A value shows as modified but looks the same

Check the data type. The number 5 and the string 5 occupy the same path but differ in type, so they are flagged as a change. Quotes in the old and new values reveal which one is a string.

Nothing happens after pasting

The comparison runs when you click Compare, not on paste. If both boxes are empty the output stays blank. Confirm there is content on at least one side, then click the button.

References

  1. RFC 8259: The JSON Data Interchange Format - IETF
  2. JSON - MDN Web Docs, Mozilla
  3. RFC 6902: JSON Patch - IETF
  4. RFC 6901: JSON Pointer - IETF
  5. Introducing JSON - json.org
  6. Diff (comparison) - overview
  7. Clipboard.writeText() - MDN Web Docs, Mozilla
  8. JSON.parse() - MDN Web Docs, Mozilla