JSON diff

Compare two JSON documents by what they hold rather than how they are written, and get every added, removed and changed path.

json
json
5 differences. Key order and formatting are ignored, because neither changes what the document says.

version

1.4.0 → 1.5.0

engines.node

>=20 → >=22

engines.bun

>=1.1 → >=1.2

engines.deno

added: >=2

keywords[3]

added: oklch

changes.txt
~ version: 1.4.0 -> 1.5.0
~ engines.node: >=20 -> >=22
~ engines.bun: >=1.1 -> >=1.2
+ engines.deno: >=2
+ keywords[3]: oklch

Questions

How is this different from a text diff?+

A text diff reports a reordered key or a reindented file as a change to every line. This one walks the structure, so only a real difference in the data is reported.

How are arrays compared?+

By position, because an array is a sequence. Moving an item is reported as two changes, which is honest: for most APIs the order is part of the meaning.

What can I paste?+

Strict JSON or the JavaScript dialect: unquoted keys, single quotes, trailing commas and comments all read fine, so a console log works as well as a file.

Related tools

The tools are free. So is most of the library.

1935 blocks and 989 pieces for shadcn/ui and Tailwind, built on the same tokens these tools write. Install one with a command and the code is yours.

No signup for the tools. MIT for free blocks, commercial licence for Pro.

Markdown version