Structural JSON comparison in your browser

Compare JSON by structure, not formatting

Understand exactly what changed between two JSON documents. Explore additions, deletions, and type changes with full key paths and flexible array comparison.

Base JSON

Contrast JSON

Use JSON comparison in your workflow

Move from a one-off browser check to repeatable reviews in your editor, terminal, AI assistant, or codebase.

Browser and editor extensions

Capture API responses in Chrome, or review JSON and XML documents without leaving VSCode.

Terminal and JavaScript

Run comparisons in scripts and CI, or embed the same structural engine in a JavaScript or TypeScript project.

AI coding assistants

Give compatible assistants documented comparison commands through Agent Skills or Model Context Protocol.

Go, Python, and Rust

Use the language-port libraries and CLIs when JSON comparison belongs in a non-JavaScript application or workflow.

Semantic diff vs. text diff

Semantic comparison parses JSON values before comparing them, so the result reflects data changes instead of presentation alone.

Key order and formatting

Reordering keys or changing whitespace alone does not create a semantic difference. Value and type changes still appear with their paths.

{
  "name": "Ada",
  "active": true
}
{"active":true,"name":"Ada"}

Arrays and raw lines

Array order can matter depending on the selected strategy. Text diff remains useful when you need to inspect exact line-level edits.

[
  "A",
  "B"
]
[
  "B",
  "A"
]

Inputs are parsed as data rather than executed as JavaScript, and integers outside JavaScript's safe Number range are preserved during parsing.

Need the original line-oriented view? Read about Git Diff view

New to structured comparison? Follow the Getting Started guide

Choose comparison options by data meaning

The wrong array strategy can hide a move or report harmless reordering. Start with what positions and duplicates mean in your data.

MethodUse it whenTrade-off
By Index

Each position has a stable meaning, such as fixed slots or snapshots.

An insertion shifts later positions and can make many elements look changed.

LCS

Order matters and you need insertions and deletions aligned by the longest common subsequence.

It preserves order, so moving an item is represented as removal and insertion rather than a move.

Unordered

Order is irrelevant, such as tags or permission lists.

It uses multiset matching: duplicate occurrence counts still affect the comparison result, so duplicates are not discarded like a set.

Key case

Ignore key case only when Status and status mean the same field; otherwise distinct keys may be treated as equivalent.

String value case

Use case-insensitive values for normalized text, not for case-sensitive identifiers, tokens, or user content.

Numeric strings

Treat numeric strings as numbers only when "42" and 42 are equivalent in your schema. Keep it off when type differences matter.

Practical ways to review JSON changes

Use a structural diff to check whether observed changes match an intended edit. The result shows how two inputs differ; it does not determine which document is correct.

Check an API response against a fixture

Compare two responses for id 101 where status changes from "pending" to "paid" to isolate that field. Before drawing conclusions, remove or normalize irrelevant timestamps, request IDs, and other fields that are expected to vary between requests.

Review configuration edits

Compare package.json before and after a dependency update, or inspect two tsconfig.json revisions. If compilerOptions.strict changes from false to true, its path identifies the setting to review; unrelated reformatting does not add noise.

Validate a data transformation

Compare a record before and after an ETL step. If total changes from "19.95" to 19.95, the default settings report a type change. Also check whether fields disappeared instead of becoming null, and choose an array mode that reflects whether order matters.

Inspect application state snapshots

Save state before and after an action, then compare the snapshots to locate an unexpected update. A path such as cart.items[0].quantity can connect a changed value to the reducer, event handler, or synchronization logic that needs investigation.

FAQ

01Is my JSON data sent to a server?
Pasting JSON does not upload the documents. Parsing and comparison run locally in your browser. Using Share uploads the compared content to our share server. Importing from a URL sends a request to the source you specify. Data in query parameters is not made confidential by Base64 encoding: it travels with page requests and may be recorded in hosting logs, so do not place sensitive data in URLs.
02How large a JSON document can the tool handle?
There is no single size or processing-time limit that applies to every device. Available browser memory, document size and nesting, and the selected array mode all affect what is practical. LCS and Unordered can require substantially more work than By Index on large arrays. For demanding inputs, try By Index or compare smaller slices; a browser tab may become slow or unresponsive if the workload exceeds its resources.
03Does the comparator distinguish numbers, strings, booleans, and null?
Yes. By default, 42 and "42", true and "true", and null and "null" are different types, and type changes are reported separately from value changes. Numeric String Equals Number is an opt-in relaxation for values such as "42" and 42. The key-case and string-value-case settings are separate and do not otherwise change JSON types.