Skip to content
SmaftyToolsSmaftyTools

All tools →

JSON Diff

Compare two JSON objects semantically in your browser. Highlight added, removed, and changed JSON paths while ignoring key order and whitespace.

About JSON Diff

JSON Diff compares two JSON documents semantically inside your browser and lists every added, removed, and modified field by its exact JSON path. Unlike plain line-by-line text diffs that get noisy when keys are reordered or whitespace changes, semantic JSON comparison focuses strictly on real data changes.

Paste an original API response on the left and an updated payload on the right to inspect differences instantly, filter by Added, Removed, or Changed paths, and debug schema migrations or webhook changes without uploading sensitive payloads.

Why use a semantic JSON diff instead of a plain text diff?

A plain text diff compares raw characters line by line, which means two identical JSON objects with different key ordering or 2-space versus 4-space indentation look completely different. A semantic JSON diff parses both inputs with JSON.parse and walks the object tree recursively, comparing actual keys, array indices, and primitive values regardless of formatting or key order. Every difference is reported with its exact JSONPath such as $.version, $.features.instantPayouts, or $.regions[2] alongside the original and updated values. Because SmaftyTools JSON Diff executes 100 percent locally in browser JavaScript, you can safely compare production API responses, authentication payloads, and configuration files without sending any data to an external server or creating an account.

How to Use the JSON Diff

  1. Paste the original JSON into the Left pane and the updated JSON into the Right pane.
  2. Review the Added, Removed, and Changed badge counts automatically.
  3. Filter the table by diff type to inspect specific paths and value changes.

Features

  • Semantic comparison that ignores key order and whitespace
  • Exact JSONPath reporting for nested objects and array items
  • Instant Added, Removed, and Changed counts with one-click filtering
  • 100% client-side execution — private API payloads stay on your device

Examples

Comparing two API config versions

Input

{"version":"2.4.0","retries":3} vs {"retries":5,"version":"2.5.0"}

Output

2 Changed paths: $.retries (3 → 5) and $.version ("2.4.0" → "2.5.0")

Frequently Asked Questions

Does JSON Diff ignore key ordering and whitespace?

Yes. Both sides are parsed into JavaScript objects before comparison, so reordered keys or minified vs. pretty-printed JSON with the same data will report as semantically identical.

Is it safe to paste private API responses here?

Yes. All parsing and diffing run locally inside your browser tab with zero network uploads.

How are array differences displayed?

Arrays are compared element by element using zero-based indices such as $.regions[2], showing added, removed, or modified elements clearly.

When should I use JSON Diff vs Text Diff?

Use JSON Diff for structured JSON payloads and configs where key order shouldn't cause false positives. Use Text Diff for prose, source code, or line-oriented logs.

JSON Formatter

Format, validate and beautify JSON online. Free JSON formatter with indentation options and key sorting — runs entirely in your browser.

JSON Schema Validator

Validate JSON data against a JSON Schema and see exactly which fields fail, and why. Free online JSON Schema validator, runs client-side.

JSON to TypeScript

Convert JSON payloads into clean TypeScript interfaces or type aliases instantly in your browser. Handles nested objects, arrays, and optional keys.

Text Diff

Compare two texts and highlight the differences line by line. Free online diff checker — runs entirely in your browser.