Skip to content
ForgePlug — Logo
developer100% Browser-BasedNo Signup

JSON Diff

The most advanced visual JSON comparison platform. Instantly understand what changed, where it changed, why it changed, and how much changed. Features side-by-side and inline comparison modes, a collapsible tree view, human-readable change explanations, a change statistics dashboard, ignore options, and exportable diff reports — all running entirely in your browser with zero server uploads.

JSON A
Ln 1Col 00 charsUTF-8JSON
JSON B
Ln 1Col 00 charsUTF-8JSON

Ready to Compare JSON

Paste JSON in both panels above or load examples to see the diff engine in action.

Side by Side
Tree View
Smart Explanations

Examples

Click an example to load both JSON panels with sample data.

API Response Change

{
  "status": "ok",
  "code": 200,
  "data": {
    "id": 1,
    "name": "Widget ...

Configuration File

{
  "server": {
    "host": "localhost",
    "port": 3000,
    "ssl": false
  },...

Package.json Update

{
  "name": "forgeplug",
  "version": "2.0.0",
  "dependencies": {
    "react": ...

User Profile Edit

{
  "id": "usr_12345",
  "profile": {
    "name": "Alice Johnson",
    "email": ...

Settings Migration

{
  "display": {
    "brightness": 70,
    "fontSize": 14,
    "reducedMotion": ...

Nested Arrays

{
  "project": "ForgePlug",
  "sprints": [
    {
      "id": 1,
      "name": "S...

Frequently Asked Questions

Is my JSON data sent to a server?
No. All comparison processing happens entirely in your browser. Your JSON data never leaves your device. This is a core privacy feature of ForgePlug — everything is client-side.
How does the diff algorithm work?
The diff algorithm performs a deep structural comparison of both JSON values. It recursively traverses objects and arrays, comparing keys and values at every level. It detects added keys, removed keys, modified values, type changes, and array element changes. The result is a tree of changes that powers all visualization modes.
What is the difference between Side-by-Side and Inline view?
Side-by-side view shows both JSONs next to each other with synchronized scrolling. Lines are color-coded: green for additions, red for deletions, yellow for modifications. This is similar to GitHub's diff view. Inline view merges both versions into a single editor showing additions (green), deletions (red strikethrough), and modifications side by side.
What does the Tree View show?
The Tree View displays the structure of differences as a collapsible tree. Each node shows whether a key was added, removed, or modified. You can expand/collapse nodes, filter by change type, and click to jump to specific differences. This is the best view for understanding the hierarchical nature of changes.
Can I export the diff results?
Yes. You can download the diff report as a JSON file, a Markdown summary, a plain text report, or a CSV file. You can also copy the diff summary to your clipboard with one click. All export options include the change statistics and human-readable explanations.
What are Ignore Options?
Ignore options let you exclude certain types of differences from the comparison. You can ignore whitespace, formatting differences, key order, array order, case sensitivity, null values, and empty strings. This is useful when comparing JSON from different sources that may have formatting or structural differences that aren't semantically important.
What does 'Smart Explanation' mean?
Smart Explanations translate raw diff results into human-readable sentences. Instead of just showing 'age changed', we display 'The value of "age" changed from 24 to 25.' This makes it immediately clear what changed without manually inspecting the values.
Can I compare large JSON files?
Yes. The diff engine is optimized for performance and can handle large JSON structures. For very large files (1000+ keys), we recommend using the Tree View for easier navigation. Performance metrics are displayed in the sidebar showing processing time.
What file formats can I upload?
You can upload .json files or any text file containing valid JSON. Simply click the Upload button on either editor or drag and drop a file onto the editor area. Both files are processed entirely in your browser.

Keyboard Shortcuts

CompareCtrl+Enter
Swap A/BCtrl+Shift+S
View modesCtrl+1 / 2 / 3
Ignore optionsCtrl+I
Toggle sidebarCtrl+B
Clear allCtrl+L

JSON Comparison: Understanding Structural Differences

How visual diff tools work, why text-based diffs fail on JSON, and how to use comparison for better debugging.

Comparing two JSON documents is a deceptively complex task. Text-based diff tools like the ones built into Git treat JSON as plain text, producing output that is cluttered with whitespace changes, reordered keys, and formatting noise. A structural JSON diff understands the data model — it compares keys, values, and nesting hierarchically, producing results that are meaningful to developers rather than buried in formatting artifacts.

Why Text Diffs Fail on JSON

Consider two API responses that are semantically identical but formatted differently: one uses 2-space indentation and the other uses 4-space indentation. A text diff will report changes on every single line, even though the actual data is the same. Worse, if a JSON serializer outputs keys in a different order, a text diff will show every key as removed and re-added, obscuring the one field that actually changed.

Structural diff tools parse both JSON documents into abstract syntax trees and then walk both trees simultaneously, comparing each node by its key path rather than its text position. This approach ignores irrelevant differences like key ordering, whitespace, and formatting, and focuses entirely on semantic changes.

Types of Structural Changes

A comprehensive JSON diff identifies three categories of changes. Additions are new keys, array elements, or values that appear in the second document but not the first. These are typically highlighted in green in visual diff tools.

Removals are keys, array elements, or values that exist in the first document but are absent from the second. These are typically highlighted in red or pink.

Modifications occur when the same key path exists in both documents but has a different value. This includes type changes (a string becoming a number), value changes (a number changing from 5 to 10), and structural changes (an object becoming an array). These are typically highlighted in yellow or amber.

Practical Applications

  • API debugging: Compare expected and actual API responses to pinpoint exactly which field changed between versions, without being distracted by formatting differences.
  • Configuration management: Diff configuration files before and after a change to understand exactly what was modified, ensuring no unintended side effects.
  • Data migration: Verify that a data migration or transformation produced the expected changes by diffing the source and destination data.
  • Schema evolution: Track how JSON schemas, database exports, or API contracts change over time across versions.
  • Code review: Review JSON test fixtures, seed data, or documentation changes with a clear view of what actually changed.

Understanding Diff Output

Visual diff tools typically present results in two views: side-by-side (showing both documents next to each other with change highlights) and inline (showing a single document with additions, removals, and modifications marked). Side-by-side is better for comparing large documents where you need to see context around each change. Inline is better for understanding the complete modified document.

Change statistics provide a quantitative summary: how many additions, removals, and modifications occurred, the total number of affected keys, and the percentage of the document that changed. This is valuable for assessing the scope of changes and prioritizing review effort.

Best Practices

When comparing JSON documents, consider using ignore options to exclude volatile fields like timestamps, session IDs, or version numbers that change on every request. This reduces noise and focuses the diff on meaningful changes. For API debugging, focus on the fields that affect application behavior rather than metadata fields that are expected to differ.

Frequently Asked Questions

Everything you need to know about comparing JSON files

Is my JSON data sent to a server?
No. All comparison processing happens entirely in your browser. Your JSON data never leaves your device. This is a core privacy feature of ForgePlug — everything is client-side.
How does the diff algorithm work?
The diff algorithm performs a deep structural comparison of both JSON values. It recursively traverses objects and arrays, comparing keys and values at every level. It detects added keys, removed keys, modified values, type changes, and array element changes. The result is a tree of changes that powers all visualization modes.
What is the difference between Side-by-Side and Inline view?
Side-by-side view shows both JSONs next to each other with synchronized scrolling. Lines are color-coded: green for additions, red for deletions, yellow for modifications. This is similar to GitHub's diff view. Inline view merges both versions into a single editor showing additions (green), deletions (red strikethrough), and modifications side by side.
What does the Tree View show?
The Tree View displays the structure of differences as a collapsible tree. Each node shows whether a key was added, removed, or modified. You can expand/collapse nodes, filter by change type, and click to jump to specific differences. This is the best view for understanding the hierarchical nature of changes.
Can I export the diff results?
Yes. You can download the diff report as a JSON file, a Markdown summary, a plain text report, or a CSV file. You can also copy the diff summary to your clipboard with one click. All export options include the change statistics and human-readable explanations.
What are Ignore Options?
Ignore options let you exclude certain types of differences from the comparison. You can ignore whitespace, formatting differences, key order, array order, case sensitivity, null values, and empty strings. This is useful when comparing JSON from different sources that may have formatting or structural differences that aren't semantically important.
What does 'Smart Explanation' mean?
Smart Explanations translate raw diff results into human-readable sentences. Instead of just showing 'age changed', we display 'The value of "age" changed from 24 to 25.' This makes it immediately clear what changed without manually inspecting the values.
Can I compare large JSON files?
Yes. The diff engine is optimized for performance and can handle large JSON structures. For very large files (1000+ keys), we recommend using the Tree View for easier navigation. Performance metrics are displayed in the sidebar showing processing time.
What file formats can I upload?
You can upload .json files or any text file containing valid JSON. Simply click the Upload button on either editor or drag and drop a file onto the editor area. Both files are processed entirely in your browser.

Guides & Articles

Learn how to get the most out of this tool with our in-depth guides.

Tool Overview

A closer look at JSON Diff — how it works, who it's for, and where it fits in your workflow.

Comparing two JSON documents by eye is error-prone — especially when they're nested five levels deep or packed onto a single line. JSON Diff parses both inputs and produces a precise, highlighted comparison of every addition, removal, and change. Side-by-side mode lines up the two documents for reference while the diff view shows exactly which paths diverged, and inline mode presents a single merged view with per-line markers.

Smart explanations turn raw diffs into understanding: instead of just coloring a node red, the tool tells you what changed and where — a key added inside user.profile, an array length change, a value that flipped from string to number. Change statistics summarize the scale of the difference, while ignore options let you exclude fields you don't care about, such as timestamps or auto-generated IDs. A collapsible tree view helps you navigate large documents without scrolling a wall of text.

This is the tool for reviewing API contract changes, auditing configuration drift between environments, or checking what a code review actually altered in a fixture file. The entire comparison runs locally in your browser — paste two JSON blobs, and the analysis happens on your device with nothing uploaded.

Key Features

Everything you get with this tool, at a glance.

Side-by-Side & Inline

Compare documents in a split view or a single merged, line-marked view.

Smart Change Explanations

Understand each diff in plain language — what changed and exactly where.

Change Statistics

Instantly grasp the scale: added, removed, and modified nodes, counted.

Ignore Options

Exclude volatile keys like timestamps and IDs from the comparison.

Collapsible Tree View

Navigate large documents by expanding only the branches that changed.

Local & Private

Both documents are compared in your browser — no uploads, no logging.

How to Use JSON Diff

Get from zero to done in four quick steps — no account, no learning curve.

  1. Paste the original

    Enter the left (original) JSON document into the first panel.

  2. Paste the changed version

    Enter the right (changed) document into the second panel.

  3. Review the diff

    Choose side-by-side or inline, then read the highlighted changes and explanations.

  4. Filter or export

    Toggle ignore rules for volatile fields, or export the report for your notes.

Practical Examples

Real input and output pairs so you know exactly what to expect.

Spot a changed value

Input

{"user":{"name":"Ada","role":"engineer"}}

Output

{"user":{"name":"Ada","role":"lead engineer"}}

Added + removed keys

Input

{"name":"ForgePlug","v":1}

Output

{"name":"ForgePlug","v":2,"new":true}

Identical documents

Input

{"a":1,"b":[1,2,3]}

Output

{"a":1,"b":[1,2,3]} — No differences

Guides & Articles

Learn how to get the most out of this tool with our in-depth guides.

Part of JSON Toolkit

Was this tool helpful?

Your feedback helps us improve JSON Diff for everyone.

Share this tool

Share
Runs in your browser100% privateNo data uploaded