JSON diff tool

Compare Two JSON Files Online – Find Every Difference Instantly

Paste, upload or load two JSON documents and Captain JSON shows what was added, removed or modified, side by side in your browser. Ignore whitespace and object key order so only real changes stand out.

  • 100% offline
  • Privacy first
  • Nothing uploaded

Part of the Captain JSON toolkit — 20+ JSON tools in one extension.

Example: two order responses compared

Illustrative example
  • Modifiedstatus"pending" → "shipped"
  • Addedmeta.carrierAdded on the right: "DHL"
  • Removedmeta.retriesRemoved from the right: 0
  • UnchangedidSame value, moved position — ignored with key order off
Cross Browser Support

Available Across All Major Browsers

Your JSON toolkit. Wherever you develop.

Captain JSON is designed to fit into your everyday development workflow. Access your JSON productivity toolkit through your preferred browser and make JSON formatting, comparison, and validation easier.

Available today: Google Chrome, Microsoft Edge and Mozilla Firefox. More browsers are coming soon.

What is JSON compare?

JSON compare, also called a JSON diff, checks two JSON documents and reports the values that were added, removed or modified. Captain JSON’s JSON Compare tool shows both documents side by side in your browser and can ignore whitespace and object key order, so formatting noise doesn’t hide the changes that matter.

About Captain JSON: Captain JSON is a browser extension by PiratesOfBugs that provides JSON developer utilities including JSON comparison, formatting, pretty printing and validation.

Features

JSON compare features

Everything you need to compare JSON files and API responses without leaving your browser.

  • Side-by-side comparison

    See the left and right JSON next to each other so differences are easy to scan.

  • Ignore whitespace differences

    Indentation, line breaks and spacing never show up as changes.

  • Ignore object key order

    Reordered keys are treated as the same object, so only real changes appear.

  • Auto compare while typing

    Edit either side and the comparison updates as you type.

  • Swap left and right JSON

    Flip the two documents to view the changes from the other direction.

  • Paste, upload or load sample JSON

    Bring in JSON from a response, a file, or try the built-in sample.

  • Download compared JSON

    Save the compared JSON to a file when you’re done.

  • Undo and redo support

    Step backward and forward through your edits without losing work.

  • Fullscreen editor

    Expand the editor to compare large documents with more room.

Problem & solution

Why plain text diffs fall short for JSON

The problem

Two API responses can look almost identical and still differ in one nested field. A generic text diff flags re-indented lines and reordered keys as changes, so the value that actually changed — or the field that went missing — gets buried in noise.

How Captain JSON helps

Captain JSON compares the data instead of the formatting. Turn on ignore whitespace and ignore key order and what’s left is what really changed: values that were added, removed or modified.

  • Side-by-side view of both documents
  • Whitespace and key-order noise switched off
  • Runs locally — your JSON never leaves the browser
Use cases

What teams use JSON compare for

From a failing regression test to a surprise config change, comparing two JSON documents answers “what’s different?” in seconds.

  • API response comparison

    Compare one endpoint’s response across environments or releases — staging vs production, before vs after a deploy — to spot a changed field, a new property or a different type.

  • Regression testing

    Compare a saved baseline response with the current one after a code change to confirm that only the intended values moved.

  • Configuration comparison

    Diff two environment or feature-flag configs to see exactly which keys differ before you promote a change.

  • Contract testing

    Check that a provider’s response still matches the shape and values a consumer expects by comparing it with the agreed example payload.

  • Debugging payload changes

    When a request that worked yesterday fails today, compare yesterday’s payload with today’s to find the field that changed.

How to use

How to compare two JSON files with Captain JSON

Four quick steps from install to answer.

  1. Step 1

    Install and open Captain JSON

    Add the extension from the Chrome Web Store or Firefox Add-ons and open it from your browser toolbar.

  2. Step 2

    Open the Compare tool

    Choose Compare in the Captain JSON workspace to get a left and a right editor.

  3. Step 3

    Add your two JSON documents

    Paste JSON into each side, upload files, or load sample JSON to try it out. Use Swap to flip the two sides.

  4. Step 4

    Set options and review the differences

    Ignore whitespace and object key order to hide formatting noise; the comparison updates as you type. Download the compared JSON when you’re done.

Examples

See what a comparison reports

These illustrative examples show how JSON compare thinks about differences. They are examples, not screenshots of the extension.

Two documents, one real change set

Illustrative example

The right-hand document lists its keys in a different order, changes one value, adds one key and drops another. Only the last three are real differences.

Left JSON
{  "id": 4821,  "status": "pending",  "items": [{ "sku": "A-100", "qty": 2 }],  "meta": { "source": "web", "retries": 0 }}
Right JSON
{  "status": "shipped",  "id": 4821,  "items": [{ "sku": "A-100", "qty": 2 }],  "meta": { "source": "web", "carrier": "DHL" }}
  • ModifiedstatusModified: "pending" on the left, "shipped" on the right.
  • Addedmeta.carrierAdded: the key exists only in the right-hand JSON.
  • Removedmeta.retriesRemoved: the key exists only in the left-hand JSON.
  • UnchangedidUnchanged: same value, different position — not a difference when key order is ignored.

What counts as a difference?

Illustrative example

A JSON-aware comparison reports changes to the data, and lets you ignore the noise around it.

  • AddedaddedA key or array item that exists only in the right-hand JSON.
  • RemovedremovedA key or array item that exists only in the left-hand JSON.
  • ModifiedmodifiedThe same path holds a different value on each side.
  • UnchangedignoredWhitespace — and, when enabled, object key order — never counts as a change.
FAQ

JSON compare: frequently asked questions

How do I compare two JSON files online?

Open Captain JSON, choose the Compare tool, then paste, upload or load sample JSON into the left and right editors. The two documents appear side by side, and with auto compare the result updates as you type. Everything runs in your browser, so your files are never uploaded.

What is a JSON diff?

A JSON diff is a comparison of two JSON documents that reports which values were added, removed or modified. Unlike a plain text diff, a JSON-aware compare understands objects and arrays, so it can ignore formatting such as whitespace and the order of object keys. Captain JSON’s JSON Compare tool does this in your browser.

Can I compare two API responses with Captain JSON?

Yes. Copy the JSON body from each response — for example staging and production, or before and after a release — and paste them into the left and right editors. Turn on ignore whitespace and ignore key order so only real changes appear. If you suspect either body isn’t valid JSON, check it with the JSON validator, and use the JSON formatter when you want a single response in a more readable layout.

Can I ignore key order when comparing JSON?

Yes. Captain JSON can ignore object key order, so {"a":1,"b":2} and {"b":2,"a":1} are treated as the same object. That matches how JSON works — the order of keys in an object isn’t meaningful — and it stops reordered keys from hiding the changes that matter. Keep in mind that the order of items in an array is meaningful in JSON.

Do whitespace and formatting differences count as changes?

Not when you ignore them. Captain JSON can ignore whitespace differences, so indentation, line breaks and spacing don’t show up as changes and you see only differences in the data itself.

How large can the JSON files be?

Captain JSON has been tested with files over 30MB, staying smooth for editing, formatting, searching, validating and comparing — including deeply nested objects and arrays.

Is my JSON uploaded anywhere when I compare it?

No. Captain JSON runs entirely inside your browser. Your JSON is parsed, compared and edited locally — nothing is uploaded or stored on a server.

How is JSON Compare different from the JSON formatter and validator?

JSON Compare finds the differences between two documents. The JSON formatter makes a single document readable, and the JSON validator checks that a document is valid JSON. They are separate tools in the same Captain JSON extension, so you can move between them without leaving your browser.

Find the difference in seconds

Install Captain JSON and compare your next two JSON files — API responses, configs or payloads — right in your browser.

  • ✓ 100% Offline
  • ✓ Privacy First
  • ✓ Lightweight

Need more than JSON Compare? Explore all 20+ Captain JSON tools.

We use analytics cookies to understand how the site is used. No personal data is sold. See our privacy practices before choosing.