JSON Diff

Compare two JSON strings side-by-side with inline diff highlighting. Toggle “Format before compare” to ignore whitespace differences.

Home/Tools/JSON Diff
JSON A
JSON B
Original (A)Modified (B)

What is a JSON Diff?

A JSON diff compares two JSON documents and highlights every difference between them — added fields, removed fields, and changed values. Color-coded line highlighting makes it easy to spot exactly what changed at a glance.

How to Use This Tool

  1. Paste your first JSON into the left panel (JSON A) using the Paste button
  2. Paste the second JSON into the right panel (JSON B)
  3. Differences are highlighted instantly — red for removed, green for added
  4. Enable Format before compare to normalize whitespace and indentation before diffing, so only structural changes are shown
  5. Click Load Sample to see a live demo

Format Before Compare

When this toggle is on, both JSON inputs are pretty-printed with 2-space indentation before comparison. This eliminates false positives caused by different whitespace or indentation styles — useful when comparing a compact JSON export to a formatted one.

Common Use Cases

  • Comparing two versions of a file — see exactly what changed between an old and a new export
  • Checking data accuracy — verify that two JSON datasets contain the same information
  • Spotting unexpected changes— quickly find additions or removals you didn't intend to make
  • Side-by-side review — compare any two JSON snippets from settings, responses, or exported data

Want to learn more? Read our guide on how to use the JSON Diff tool →

FAQ

What does “Format before compare” do?

When enabled, both JSON inputs are pretty-printed with consistent indentation before the diff runs. This removes false positives caused by different whitespace or indentation styles, so only structural changes are highlighted.

Can I compare minified JSON?

Yes. Enable the Format before compare toggle to normalize both inputs before comparing, so whitespace differences are ignored.

Is my data safe?

Yes. All comparison logic runs entirely in your browser. Your JSON is never sent to any server.

How do I jump between differences?

Use F7 to jump to the next difference and Shift+F7 to go to the previous one. You can also use Ctrl/Cmd+F to search within either panel.