Free · No sign-up · Runs in browser

JSON Diff

Semantic JSON diff that ignores whitespace and key order. See every added, removed, and changed property as a dotted path with before/after values. Perfect for comparing API responses, config files, and database records.

JSON A (before)
JSON B (after)
Diff✓ +2 / −0 / ~3
CHG
version− "1.0.0"+ "1.1.0"
CHG
replicas− 3+ 5
CHG
env.LOG_LEVEL− "info"+ "debug"
ADD
env.FEATURE_FLAG+ true
ADD
ports[2]+ 8080
+2 added−0 removed~3 changed=3 unchanged

About the Semantic JSON Diff

This free online JSON diff tool compares two JSON documents structurally, ignoring whitespace, indentation, and key order. Unlike line-based diffs, reordering keys never shows up as a change — only genuine data differences do. Every change is reported as a dotted path (env.LOG_LEVEL,ports[2]) along with the before and after values.

Why Semantic Beats Line-Based

Line diffs are noisy for JSON. Pretty-printing with 2 spaces vs 4 spaces, trailing commas, or reordered keys all show up as "changes" even when the data is identical. A structural diff walks the object tree and reports only what actually changed, which is what you usually want when comparing API responses, configuration files, or database records.

Common Use Cases

  • Compare two API responses to spot regressions
  • Audit package.json or tsconfig.json before merging
  • Diff Kubernetes manifests expressed as JSON
  • Compare GraphQL introspection results across versions
  • Review Elasticsearch index settings between environments
  • Check which secrets/env vars drifted between deploys

Diff Output Format

  • ADD — the path exists only in B (added)
  • DEL — the path exists only in A (removed)
  • CHG — the path exists in both but with different values
  • EQ — unchanged (hidden by default; toggle to show)

How Arrays Are Compared

Arrays are compared by index. If A has [1, 2, 3] and B has[1, 4, 3], you'll see a single CHG at index 1. Inserts and deletes shift every subsequent index, so for ordered logs you may prefer a line diff instead — the Text Difftool is better for that.

Frequently Asked Questions

Does it preserve key order?

Yes, but order does not affect equality. If both inputs contain the same keys with the same values, the output shows them as unchanged regardless of the order they appeared in each file.

Can it diff JSON that is syntactically invalid?

No — both inputs must parse as JSON. If either one fails, the error bar shows the parser's message and highlights the broken input.

Is my JSON sent anywhere?

No. Both inputs stay in your browser. Safe for API payloads with tokens or personal data.

Related Tools

Format or minify huge JSON files with the JSON Formatter, or compare raw text line by line with the Text Diff tool.

Structural diff

Compares values, not whitespace — key order never shows as a change.

Dotted paths

Every difference points at an exact JSON path like env.LOG_LEVEL.

Live & private

Updates as you type; nothing leaves your browser.