JSON Diff
Compare two JSON documents and instantly highlight added, removed and modified values. Everything runs locally in your browser.
Status
0
Added
0
Modified
0
Removed
0
Total Changes
How To Use
Paste the original JSON
into the left editor or upload a file.
Paste the modified JSON
into the right editor or upload a file.
Click Compare
to generate the comparison.
Review the result
with added, removed and modified values highlighted.
Copy or adjust
and compare again as needed.
About JSON Diff
The DevToolVerse JSON Diff tool helps you compare two JSON documents and instantly see what changed. Whether you're reviewing an API response, tracking configuration changes, or auditing data updates, it highlights every addition, removal, and modification.
All processing happens locally in your browser, meaning your JSON is never uploaded to a server. This keeps your data private while providing fast, accurate comparisons.
Developers reach for JSON Diff in a few recurring situations: checking an API response before and after a deployment, spotting configuration differences between staging and production environments, or reviewing the output of a data migration against what was expected. If you need to compare the payloads of two JSON Web Tokens — for example, before and after reissuing one — decode each with the JWT Decoder first, then paste the two JSON payloads here. And if you only need to clean up or validate a single JSON document rather than compare two, JSON Formatter is the more direct tool for that.
Original
{
"id": 42,
"name": "Alice",
"role": "editor",
"active": true,
"betaAccess": true
}Modified
{
"id": 42,
"name": "Alice",
"role": "admin",
"active": true,
"lastLogin": "2026-08-20"
}- Modified
role— "editor" → "admin" - Removed
betaAccess— present only in the original document - Added
lastLogin— present only in the modified document
Features
Side-by-side comparison
of two JSON documents.
Highlighted differences
for added, removed and modified values.
Upload JSON or TXT files
for quick comparison.
Swap documents
to compare in the opposite direction.
Pretty-print both documents
before comparing.
Runs entirely in your browser
your data never leaves your device.
How JSON Diff Works
JSON Diff compares the two documents line by line, the same way a text diff works — it does not parse and compare the JSON structure itself. Each line is classified as one of the following:
| Status | Meaning |
|---|---|
| Added | A line exists only in the Modified document. Highlighted in green on the right. |
| Removed | A line exists only in the Original document. Highlighted in red on the left. |
| Modified | A removed line and an added line at the same position, paired together and counted as one change — shown with the same red/green highlighting as Removed and Added, on both sides. |
Because the comparison is line-based rather than structural, two documents that represent the same data but are written differently — different key order, different indentation, everything on one line versus spread across many — can appear more different than they actually are. Using the Pretty Format button (or JSON Formatter) to give both documents consistent formatting before comparing produces a far more useful, line-aligned diff.
Common JSON Diff Mistakes & Caveats
Minified JSON Produces an Unhelpful Diff
Because comparison is line-based, two single-line minified documents are each seen as one long line — any difference marks the entire line as changed. Use Pretty Format, or JSON Formatter, to expand both documents first.
Key Order Can Affect the Diff
JSON Diff compares line text, not parsed JSON structure. Two documents with identical data but differently ordered object keys will show as changed, even though they're semantically equivalent JSON.
Compare and Pretty Format Require Valid JSON
Both actions parse each document first. If either side fails to parse, JSON Diff reports which document is invalid instead of comparing or formatting.
Swap Does Not Require Valid JSON
Swap exchanges the Original and Modified text exactly as typed, even if one or both documents are currently invalid — it never validates or formats them.
Edit Mode vs Comparison Mode
Edit Mode
The default state. Both editors are fully editable — type, paste, or upload JSON into either side, and use Swap, Pretty Format, or Clear Both freely.
Comparison Mode
Entered by clicking Compare. Both editors become read-only so the comparison result stays stable while you review it, and Swap, Pretty Format, and Clear Both are disabled. Click "Back to Editor" to clear the comparison and resume editing.
FAQ
JSON Diff compares two JSON documents and highlights the values that were added, removed or modified between them.
Yes. JSON Diff is completely free to use with no registration required.
No. Everything is processed locally in your browser. Your JSON is never uploaded to any server.
Yes. Large JSON files can be compared directly in your browser. Performance depends on your device and browser.
Yes. Nested objects and arrays are fully supported when comparing documents.
Yes. JSON Diff compares the text of each line rather than the parsed JSON structure, so two documents with identical data but differently ordered keys will show as changed. Formatting both documents the same way before comparing helps avoid this.
Added means a line exists only in the Modified document. Removed means a line exists only in the Original document. Modified means a removed line and an added line were paired at the same position and counted as a single change to that line.