# JSON Compare

> Compare two JSON documents by meaning, not by text, with every change listed by path. Runs entirely in your browser, so nothing is uploaded.

Source: https://toffeekit.com/tools/json-compare

**Category:** [Developer](https://toffeekit.com/category/developer) · **Price:** Free · **Runs:** in your browser, nothing is uploaded

Open the tool: https://toffeekit.com/tools/json-compare

**Also useful for:** json diff, compare json, json difference, json comparison, diff two json, semantic diff, api response diff

## What you can do

- **Compare two API versions** — See which fields were added, removed or changed between responses. ([open with this preset](https://toffeekit.com/tools/json-compare?preset=api))
- **Ignore array order** — Match list items as a set, so reordered tags and IDs don't count. ([open with this preset](https://toffeekit.com/tools/json-compare?preset=unordered))
- **Line-by-line view** — Both documents with keys sorted, differences highlighted. ([open with this preset](https://toffeekit.com/tools/json-compare?preset=lines))

## How it works

1. Paste the old version into Original JSON and the new one into Changed JSON.
2. Turn on Ignore item order if lists can be shuffled without meaning anything.
3. Read the Changes by path table, or switch View to Line diff to see both documents side by side.
4. Click the added, removed or changed counts to filter, then Copy report or Save it as a text file.

## FAQ

### Does key order matter when comparing JSON?

No. JSON objects are unordered, so {"a":1,"b":2} and {"b":2,"a":1} are reported as the same. Only real differences in keys and values are listed.

### How are arrays compared?

By default, order matters and items are matched with a longest-common-subsequence diff, so an inserted item shows as one addition rather than shifting every index. With Ignore item order on, arrays are compared as sets of values.

### What does the path like $.projects[1].stars mean?

It's a JSONPath to the changed value: the stars field of the second item in the projects array. Indexes start at 0 and refer to the changed document for additions and changes.

### Is 5 the same as "5"?

No. A number and a string are different JSON types, so the change is listed with a note showing the type change, such as number → string.

### Is 1.0 the same as 1?

Yes. JSON numbers are compared by value, so 1, 1.0 and 1e0 are equal.

### Is JSON Compare free and private?

Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so what you type or paste never leaves your device. It works on phones and computers alike.

## Privacy

JSON Compare runs entirely in your browser. Your files and text are processed on your device and are never uploaded.

## Related tools

- [JSON Formatter](https://toffeekit.com/tools/json-formatter) — Format, minify and validate JSON with clear errors.
- [Base64 Encode / Decode](https://toffeekit.com/tools/base64-encoder) — Encode text to Base64 or decode it back, UTF-8 safe.
- [URL Encode / Decode](https://toffeekit.com/tools/url-encoder) — Percent-encode query values or whole URLs.
- [HTML Entities](https://toffeekit.com/tools/html-entity-encoder) — Escape < > & and quotes, or decode entities.
- [JWT Decoder](https://toffeekit.com/tools/jwt-decoder) — Read a token's header, claims and expiry.
- [Hash Generator](https://toffeekit.com/tools/hash-generator) — MD5, SHA-1, SHA-256, SHA-384 and SHA-512 at once.

