JSON Diff and Comparison Tool

Compare two JSON documents side-by-side to detect additions, deletions, and modified properties. Runs entirely in your browser so your payloads and API configs remain completely private.

How to use

1

Paste or upload your original JSON into the Left pane.

2

Paste or upload your modified JSON into the Right pane.

3

Click Compare JSON, or toggle Ignore key order if object keys may be sorted differently.

4

Review the unified diff or switch to RFC 6902 JSON Patch format to copy or download the delta.

Why standard text diffs fail on JSON data

Developers often compare configuration files and API responses using traditional text diff utilities such as git diff or generic text comparison websites. However, line-oriented diff tools treat JSON as plain arbitrary strings. If two identical JSON payloads have keys sorted in different orders, or differing whitespace and indentation levels, a standard text diff highlights dozens of false differences. A true semantic JSON comparison parses the underlying abstract data structures, normalizing keys and evaluating values according to the JSON specification.

Semantic comparison with key-order independence

In JSON specification (RFC 8259), object key ordering is formally undefined. An object written as {"a": 1, "b": 2} is semantically identical to {"b": 2, "a": 1}. When comparing microservice outputs or database snapshots generated by different serialization libraries, key order regularly varies. With Ignore key order enabled, this tool recursively sorts keys before comparing, guaranteeing that reordered attributes are not falsely flagged as modifications.

Deep recursive analysis across nested objects and arrays

Modern applications rely on complex, deeply nested JSON structures containing dictionaries, lists, and primitives. This comparison engine traverses nested objects and arrays recursively to isolate exact property paths. When a nested configuration setting changes—such as config.network.timeout—the tool pinpoints the precise leaf node rather than replacing entire parent blocks. Array elements are checked sequentially, highlighting newly inserted indices, removed items, and modified array members.

RFC 6902 JSON Patch export for automation

Beyond visual side-by-side comparisons, engineering teams often need machine-readable delta specifications to automate changes. This tool implements the RFC 6902 JSON Patch standard, compiling the detected changes into a list of atomic operations (add, remove, and replace) paired with JSON Pointer paths (RFC 6901). You can copy or download the generated patch file to apply programmatic updates across REST APIs, state stores, and MongoDB migrations.

Guaranteed local processing and security

Configuration files and database exports frequently contain sensitive API keys, database credentials, server hostnames, and proprietary business schemas. Many online diffing websites transmit your payloads to remote third-party servers for backend processing. This tool runs 100% locally inside your web browser using client-side JavaScript and dedicated Web Workers. Your data never leaves your device and no network requests are ever made with your input.

Frequently asked questions

Does this JSON diff tool send my data to an external server?

No. All parsing, structural comparison, and patch generation execute entirely within your local browser. Your data is never uploaded.

What is the difference between textual diff and semantic JSON diff?

A textual diff compares raw strings line-by-line, meaning whitespace changes and key reordering are incorrectly flagged as differences. A semantic JSON diff parses both documents as structured objects, ignoring whitespace and optional key ordering to focus strictly on data changes.

What is RFC 6902 JSON Patch?

RFC 6902 is an IETF standard defining a structured JSON format for describing changes to a JSON document. It uses operations like 'add', 'remove', and 'replace' paired with JSON Pointers to specify atomic modifications.

Can I compare very large JSON files?

Yes. The comparison engine is offloaded to a background Web Worker so your browser interface remains responsive and smooth even when diffing large multi-megabyte payloads.

How does the tool handle formatting or indentation differences?

Because both payloads are parsed into structured memory representations and normalized, differences in indentation, spacing, or line endings are ignored during comparison.