Compare two JSON objects and visualize the differences with detailed analysis
JSON Compare highlights additions, deletions, and modifications between two JSON documents. You can ignore whitespace/case/order and export a JSON Patch or a Markdown report.
The tool uses structural comparison to identify differences between two JSON objects. It detects additions, deletions, and modifications at any nesting level, providing a visual side-by-side diff view.
No, the tool works offline in your browser. Your JSON data is processed locally and never uploaded to our servers.
You can ignore whitespace differences, case sensitivity, and object/array order. These options help focus on meaningful structural changes rather than formatting differences.
Yes, you can ignore whitespace. The tool will ignore differences in whitespace within string values (e.g., 'Hello, World' vs 'Hello,World'). Whitespace outside of strings is already ignored by JSON parsing.
Yes, you can ignore case. The tool will compare keys and string values case-insensitively by lowercasing them before diffing. For example, 'Status' and 'status', or 'SUCCESS' and 'success', are treated as equal.
Yes, you can ignore key order. The tool will sort object keys and array elements using a stable comparator before diffing, so reordering does not count as a change. This works for arrays of primitives and objects (objects are compared via their JSON representation).
When any ignore option is enabled, the view switches to a normalized preview so that visual highlighting matches the ignore rules exactly. Disable all ignore options to return to the editable raw view.
Green highlights show additions, red shows deletions, and yellow shows modifications. The statistics panel provides a summary of total changes, and the diff can be exported as a detailed report.
Yes, the tool can handle large JSON files efficiently. For very large files, consider using the 'ignore whitespace' option to improve performance and focus on structural differences.
You can import .json and .txt files, or paste JSON content directly. The tool validates JSON syntax and provides helpful error messages for invalid JSON.
Use the 'Export Report' button to download a detailed markdown report, or 'Copy Diff' to copy a summary to your clipboard. The report includes statistics and detailed change descriptions.
Yes, you can merge changes by path. The tool will merge changes by path. For example, if you have a JSON object with a key 'name', and you want to merge changes by path, you can use the 'Merge by path' button to merge changes by path.
The tool can handle large JSON files efficiently. For very large files, consider using the 'ignore whitespace' option to improve performance and focus on structural differences.
JSON Patch is a standard format for describing how to transform one JSON document into another using a list of operations such as add, remove, and replace. Use the 'Export JSON Patch' button to download a patch that turns A into B.
We compute a minimal, reliable set of operations from A → B. Object field additions/removals are emitted as add/remove at their JSON Pointer paths, and changed values as replace. Arrays are exported conservatively as a single replace when contents differ to avoid index drift issues.
In JavaScript, you can use libraries like fast-json-patch: applyPatch(original, patch). In other languages, search for 'JSON Patch RFC 6902' libraries. The patch we export follows the standard and should work across implementations.