# JSON diff

Diff two JSON documents by value, not by line, so reordered keys are not reported as changes. Free, and neither document is uploaded.

Canonical page: https://filetity.com/json-diff

## Capabilities

- Free: Yes, with no watermark and no page limit.
- Account required: No. There is no account system.
- Processed on device: Yes. The file is read by your browser and never uploaded. There is no server to send it to.
- Formats: Two JSON documents in. A list of differences by path out, copyable as text.
- Limits: Array elements are compared by position. Inserting one element at the front therefore reports every later index as changed.
- Mobile: Yes, on any modern mobile browser. Large files are limited by the memory the phone gives the browser.
- Offline: Yes, after you have used it once. Your browser keeps what the tool needs, so it then works with no network connection.

## Questions

### Why not just use a normal text diff?

Because JSON key order carries no meaning. Reorder the keys of an identical object and a text diff lights up every line, while a single flipped boolean deep in a nested object hides among matching braces. Comparing parsed values reports the second and ignores the first.

### What does the path column mean?

It is the route to the value that changed, written the way you would type it to reach it: $.user.address.city for a nested key, $.items[2] for the third element of an array.

### How are arrays compared?

By position, element by element. That means inserting an item at the front shows every following index as changed, which is a true description of what happened rather than a guess about what you intended.

### Are my documents sent anywhere?

No. Both stay in your browser. Comparing two API responses or two config files is exactly the case where uploading them to a stranger's server would be the wrong move.

### What does it report when a value changes type?

One change at that path, showing both sides. A number that became a string, or an array that became an object, is listed as a single changed value rather than as a tree of every key underneath it removed and added. Long values are cut at 120 characters so a change stays on one line.

## Related tools

- [JSON Formatter and Validator](https://filetity.com/json-formatter): Format, beautify, validate and read JSON, and find the line that broke it.
- [XML formatter](https://filetity.com/xml-formatter): Format, beautify and validate XML, with real error positions.
- [HTML formatter](https://filetity.com/html-formatter): Beautify minified or messy HTML into something readable.
