JSON Diff Tool

Pure Frontend · Add/Remove/Replace Detection · JSON Patch Generator · Path Tracking

Zero Dependencies · Works Offline
📝 JSON Input
Original JSON (A)
Modified JSON (B)
📂 Drag  📂 Drag .json file to either input
🔒All JSON comparison runs locally in your browser. No data is uploaded.

What Can the JSON Diff Tool Do?

The JSON Diff Tool is a pure frontend online tool for precisely calculating differences between two JSON objects. Enter the original and modified JSON, and the tool automatically detects added, removed, and changed fields, generates RFC 6902 compliant JSON Patch, and visually displays each change's path and value. Supports deep recursive and shallow comparison modes, with array comparison by index or by value matching. All data is processed locally in your browser—nothing is uploaded to any server.

Core Features

How to Use

Step 1: Paste the original JSON (A) in the left input and the modified JSON (B) in the right input, or drag-and-drop .json files.

Step 2: Choose comparison mode—deep (all levels) or shallow (top only)—and array comparison strategy.

Step 3: Click "Compare" or press Ctrl+Enter to calculate differences.

Step 4: View diff details and JSON Patch. Click "Copy Patch" or "Download Patch" to save results. Ctrl+Shift+C copies instantly.

Use Cases

API Version Migration

Compare v1 and v2 API response JSON to quickly identify added, removed, and changed fields. Generate Patch for incremental updates.

Config File Audit

Compare configuration JSON across environments to discover differences and ensure production matches expectations.

Data Synchronization

Calculate JSON data differences between client and server, generate Patch for efficient incremental sync with minimal network transfer.

Automated Testing

Compare expected vs actual JSON test output, pinpoint exact field paths where assertions fail, and speed up test debugging.

Technical Background

JSON Patch (RFC 6902) is a standard format for describing changes to JSON documents, with 6 operations: add, remove, replace, move, copy, and test. JSON Pointer (RFC 6901) locates specific values in a JSON document, e.g., /foo/0/bar refers to the bar field of the first item in the foo array. Unlike JSON Merge Patch (RFC 7396), JSON Patch is more precise and can distinguish between null value deletion and non-existent fields.

FAQ

What comparison modes are supported?

Deep comparison (recursively compares all nested levels) and shallow comparison (top-level keys only). Array comparison can be by index or by value matching.

What standard does the generated JSON Patch follow?

It follows RFC 6902 JSON Patch specification, generating add/remove/replace operations that can be used directly in API requests.

Is my data uploaded to a server?

No. All JSON comparison is performed locally in your browser. Your data never leaves your device.

How large a JSON file can I compare?

We recommend keeping each JSON under 1MB for smooth performance. Drag-and-drop .json file upload is supported.

How are array differences handled?

Choose between index-based comparison (strict positional matching) or value-based matching (smart content matching).

Does it support nested JSON comparison?

Yes. Deep comparison mode recursively compares all nested objects and arrays, pinpointing every path change.

JSON Diff Tool | No Signup, Client-Side · No Server Uploads

Feedback: dexshuang@google.com