JSON diff

Compare JSON by content, not formatting. Key order and whitespace are normalized automatically.

Original
Changed
Nothing is uploaded. The comparison runs on this device.

Add both texts to see the differences here.

Advertisement

Two JSON files can hold the same data and still look completely different: keys in another order, other indentation, everything on one line. Diffspot formats both sides and sorts keys before comparing, so the diff shows only real changes. A path list underneath summarizes every change, like $.features.reviews: false → true.

How to compare JSON

  1. Paste or drop the first JSON on the left. It's formatted and its keys sorted automatically (you can turn that off under Data options).
  2. Paste the second JSON on the right.
  3. Read the changes in the side-by-side view, or in the list of changed paths below it.
  4. Ignore array order if the order of items doesn't matter to you (Data options → Ignore array order).

Why Diffspot

Advertisement

Frequently asked questions

Does key order matter?

No. With Sort keys on (the default), both documents are normalized before comparing, so only real value changes appear.

Can I ignore the order of array items?

Yes. Turn on Data options → Ignore array order. Arrays are then compared as sets of values.

What if my JSON is invalid?

Diffspot shows the parse error with its position and still compares the raw text, so you can see what's wrong.

Does it support JSON5, JSONC or JSON Lines?

Comments and trailing commas are accepted. For JSON Lines, compare as plain text on the main diff checker, line by line.

Is it safe to paste confidential text or files?

Yes. Diffspot computes every comparison on your device: the page loads the engine once, then your text and files stay in the browser tab. There is no upload and no server-side storage, and ads are shown in a separate sandboxed frame that cannot read the page. How Diffspot works explains the details, and you can confirm it in your browser's network panel.

How large can the inputs be?

There is no fixed limit. Your device's memory sets it. Texts of tens of megabytes and hundreds of thousands of lines work well on a typical laptop. Phones handle smaller inputs.

More comparison tools