Skip to content
Input
Text
Limit
1 MiB
Runtime
Browser

Compare two JSON documents by structure

Find meaningful structural changes between two valid JSON values while ignoring indentation and object member order.

Local processingNo sign-upNo share URL

Compare JSON

Inputs are limited to 1 MiB and stay in this browser tab.

Paste or edit the source. Tool Swim does not upload or save it.

This second document is processed under the same local limits.

Structural changes

Nothing is placed in a URL, account, or remote log.

What this tool does

Strict, bounded, local processing

The comparison walks both parsed trees. Array positions remain significant, and every result is expressed as an escaped JSON Pointer path.

A structural diff filters out formatting noise

Text comparison reacts to line wrapping, indentation, and object member order. A structural JSON comparison parses both sides first, then walks objects, arrays, and primitive values. Reformatting an unchanged document produces no entries, while a changed value is reported at the location where the represented data differs.

Tool Swim classifies additions, removals, value changes, and type changes. A number changing from 10 to 11 is a value change; a number changing to the string "10" is a type change. That distinction often explains why a typed client or schema validator behaves differently even when the text looks similar.

Array positions are compared in order

Arrays are ordered JSON values, so the comparison uses each index. Inserting one element near the beginning can cause later positions to appear changed. An unordered-set comparison would need a domain-specific identity key and explicit duplicate behavior, neither of which can be inferred safely from arbitrary data.

For records that have stable identifiers, normalize them in application code before comparison or compare a map keyed by that identifier. Keep this tool's ordered result as an honest description of the JSON values that were actually supplied.

Paths are useful, but values can still be sensitive

Each location uses JSON Pointer escaping, so a member containing a slash appears with `~1` and a tilde appears with `~0`. The output includes before and after values to make a local review useful. Those values may contain the same credentials or personal information as the source documents.

Copy only the paths or redacted result needed for a ticket. Tool Swim does not upload either input, but clipboard managers, browser extensions, screenshots, and downstream paste destinations remain separate trust boundaries.

Primary standards

Questions and answers

Related JSON tools

Related JSON guides