Diffchecker
PrivateSecureFree

JSON Diff -
Compare Two JSON Objects Online

Compare two JSON objects online with a semantic diff that catches value changes, type mismatches, and added or removed properties — each tagged with its full key path. Keys are sorted and both sides reformatted before comparison, so prettified versus minified JSON never produces a false difference.

Your JSON stays completely private: the entire comparison runs in your browser, with nothing sent to a server. No uploads, no logging, no background sync. That makes it safe for API responses carrying bearer tokens, internal schemas, and production config you can't paste into a cloud tool.

Semantic JSON Comparison

Reindent a file or reorder its keys and a plain text diff lights up every line red, even when the data is identical. Semantic comparison works differently: it parses both inputs, sorts keys, and matches values by their path, so whitespace, key order, and formatting differences simply disappear. What's left is only the changes that affect the data — a value that moved, a type that shifted, a property that appeared or vanished.

Three Types of JSON Differences

Every change is classified and colour-coded so you can scan the result instead of reading each line. Three kinds cover everything a JSON compare needs to surface.

Value Differences. Same key, same type, different value — a name updated, a number adjusted, a boolean flipped. The most common change in API responses and config files.

Type Mismatches. The value kept its key but changed type. This catches stringified numbers (30 vs "30") and booleans that became strings during serialization — a frequent and silent source of runtime bugs.

Added & Removed Properties. A key exists on one side but not the other — fields added in a new API version, removed in a refactor, or accidentally dropped between deploys.

Smart Array Matching

Comparing arrays is where most JSON diff tools fall apart. A naive index-by-index compare reports every element as changed the moment one item is inserted or reordered. This tool is smarter: when array elements are objects, it detects a stable identity key — an id, name, or similar unique field shared across both sides — and matches elements by that key instead of their position. Move an object to a different index and it's recognized as the same object, not a delete plus an add.

When there's no obvious identity key, it falls back through exact structural hashing, then similarity scoring for near-matches, and only then to positional pairing. The result is a diff that follows the data, not the line numbers — so reordered lists stay quiet and genuine additions, removals, and edits are reported with their position in the path.

Sort, Filter, And Navigate

Once the diff is computed, a few controls help you read a large result quickly rather than scrolling through hundreds of unchanged keys.

Sorted Or Input Order. View the comparison with keys sorted alphabetically and the right side aligned to the left for the cleanest read, or switch to original input order to see the documents exactly as you pasted them.

Filter By Change Type. Show all differences, or narrow to only value changes, only additions, or only removals. Useful for answering a single question — "what got removed?" — without the rest of the noise.

Click To Jump. A side list of every difference lets you click one and jump straight to that key in both editors, then edit in place to resolve it without leaving the page.

How To Compare Two JSON Files Online

Four steps, no sign-up, results the moment both sides have valid JSON.

  1. 01Paste Left JSON. Drop your first document into the left editor. Invalid syntax shows a parse error with the line so you can fix it before comparing. Files up to .json, .jsonc, .json5, and .geojson can be uploaded too.
  2. 02Paste Right JSON. Paste or upload the second document. Both inputs are parsed and normalized in your browser the moment they land — nothing is sent anywhere.
  3. 03Review Differences. Changes are colour-coded by type — value change, type mismatch, added, or removed — and each is tagged with its full key path so you know exactly where it sits.
  4. 04Jump And Fix. Click any difference in the side list to jump to that position in both editors, then edit in place to resolve it. Save the comparison or share it through a self-contained link.

Why Use This JSON Compare Tool

Semantic JSON diffing, in the browser, with no account wall and no server round-trip. Eight things make it stand out:

  1. 01Semantic, Path-Based Diff. Keys are matched by path, not position, so reformatting or reordering a file never produces false differences — only real data changes show up.
  2. 02Type-Aware Comparison. Distinguishes 30 (number) from "30" (string) and flags it as a type mismatch rather than a plain value change, catching a whole class of serialization bugs.
  3. 03Smart Array Matching. Object arrays are matched by a detected identity key, then by structural hash and similarity — so reordered or inserted elements don't cascade into false diffs.
  4. 04Deep Nested Comparison. Recursive at any depth. Every difference reports its full path, like users[1].permissions, so you can locate it instantly in the source.
  5. 05Sort & Filter Results. Toggle between sorted and original input order, and filter the result to only value changes, additions, or removals to focus on one question at a time.
  6. 06Inline Parse Errors. Invalid JSON is flagged in the editor with the offending line, so you fix syntax before diffing instead of guessing what broke.
  7. 07100% Private & Client-Side. JSON never leaves the browser tab — no upload endpoint, no background sync. Safe for API responses with tokens and for internal schemas.
  8. 08Instant & Free. Diffs update on every keystroke with no Compare button, and there's no registration, quota, or premium tier gating any feature.

What This JSON Diff Handles

Anywhere two JSON documents need to be reconciled, semantic comparison pays off. These are the situations where it helps most.

API Development

Compare API responses between staging and production, catch breaking changes before they ship, and verify migration payloads match what's expected.

  • Response diffs across environments
  • Breaking-change detection between API versions
  • Contract-test snapshot comparison
  • Webhook payload investigation
  • GraphQL response shape audits

Configuration Files

package.json, tsconfig, eslintrc, IAM policies, CloudFormation — find exactly which setting changed between branches or deploys.

  • package.json dependency diffs
  • tsconfig strictness changes
  • Prettier / ESLint config drift
  • AWS IAM policy comparisons
  • CloudFormation template reviews

Data & Documents

NoSQL documents, analytics events, feature flags — track field-level changes across migrations or releases.

  • MongoDB / Firestore document diffs
  • Analytics event schema drift
  • Feature-flag payload changes
  • JSON Schema comparisons
  • ETL input vs output verification

Frequently Asked Questions

How do I compare two JSON files online?

Paste the first document in the left editor and the second in the right, or upload .json files into either side. Keys are sorted, both sides are diffed semantically, and every change is shown with its full path. Click any difference to jump to it in both editors.

Does it handle nested objects and arrays?

Yes. Comparison is recursive at any depth, and each difference reports its full path — like orders[0].items[2].price — so you can locate it immediately in your source data.

How are arrays compared?

Smartly, not just by index. When array elements are objects, the tool detects a stable identity key (such as id or name) and matches elements by it, then falls back to structural hashing, similarity scoring, and finally position. Reordering or inserting an element won't report the whole array as changed.

Does key order matter?

No. Keys are sorted before comparison, so two documents with identical data in a different key order are reported as identical. That's the main advantage of a semantic JSON diff over a plain text diff.

What about duplicate keys?

They're preserved. A standard JSON.parse silently drops duplicate keys, but this tool keeps every occurrence and matches them by similarity, so a document with repeated keys is compared faithfully instead of being quietly collapsed.

Can it tell a number from a string?

Yes. It's type-aware, so 30 (number) and "30" (string) are reported as a type mismatch rather than equal values. The same applies to booleans that were serialized as strings — a common and hard-to-spot bug.

What happens with invalid JSON?

The editor shows a parse error with the line and a short description of the problem. Fix the syntax and the diff runs automatically — there's no Compare button to press.

Is my JSON private and secure?

Yes. The entire comparison runs in your browser; your JSON is never uploaded, stored, or sent to a server to be diffed. That makes it safe for API responses with tokens, internal schemas, and production configuration.

Is this JSON compare tool free?

Yes — 100% free for personal and commercial use, with no sign-up, no usage limits, and no premium tier gating features like sorting, filtering, or sharing.