← All Tools Dev

JSON Diff Tool

Compare two JSON payloads and visualize every difference — added, removed, and changed fields.

Original
Valid JSON
Modified
Valid JSON
Diff Results
0 changes 0 Added 0 Removed 0 Modified

How to Use JSON Diff Tool

This tool helps you compare two JSON structures side by side and instantly see every difference. Follow these steps to get started:

Who Uses This Tool?

Frequently Asked Questions

How does the JSON diff algorithm work?

This tool uses a Longest Common Subsequence (LCS) algorithm for arrays, which intelligently matches unchanged items even when elements are inserted or deleted in the middle. For objects, it compares keys and values recursively. This produces accurate, human-readable diffs even for complex nested structures.

Is my JSON data sent to any server?

No. All JSON comparison happens entirely in your browser using JavaScript. Your data never leaves your computer. This makes the tool safe for comparing sensitive or proprietary JSON payloads.

What happens if my JSON is invalid?

The tool validates JSON in real time as you type. If either side contains invalid JSON, a red status dot appears with an error message, and the Compare button will show an error. Fix the syntax issues and the tool will become ready to compare again automatically.

Can I compare very large JSON files?

Yes, but very large arrays (over 2000 elements) fall back to index-by-index comparison instead of the LCS algorithm to prevent memory issues. For extremely large JSON files, consider using the Format buttons to prettify the output first for easier manual review.

What do the different colors mean?

Green badges/values indicate added content, red indicates removed content, and gold/yellow indicates modified content. The diff tree also uses blue "nested" badges for container nodes that have multiple child changes, with the count of changes shown in the badge.