JSON Diff
Compare two JSON documents structurally, so key order and formatting do not matter.
About the JSON Diff
A line-based diff on JSON is close to useless, and it is what most people reach for. Reorder the keys and every line shows as changed while nothing changed at all. Reformat the file and the whole document is different. Change one value six levels down and you are told a line differs rather than which path to look at.
This compares the parsed values instead. Whitespace and key order are irrelevant by construction, and every difference is reported as the path where it lives — `config.retries`, `users[2].email` — which is something you can act on directly.
Type changes are separated from value changes, because they usually mean something different. A number becoming the string "3" is almost always a serialisation bug rather than an intentional edit, and burying it among ordinary value changes is how it gets missed.
One honest limitation: arrays are compared by position. Insert an item at the front and every later index reports as changed, because working out that it was an insertion rather than a wholesale rewrite is a substantially harder problem and any attempt at it guesses at intent. Comparing by index and saying so is more useful than a clever answer that is sometimes wrong.
Both documents are parsed and compared in your browser. API responses are exactly the sort of thing that carries real customer data, and none of it goes anywhere.
How it works
Paste the two documents — an API response before and after, two config files.
Differences are reported as paths rather than line numbers.
Key order and formatting are ignored, because they are not differences.
Frequently asked questions
- Why not just use a text diff on JSON?
- Because key order and formatting are not differences, and a text diff cannot tell. Reordering keys shows every line as changed; reformatting shows the entire file as different. Comparing the parsed values sidesteps both.
- Does key order matter?
- No. Two documents with the same data in different key order are reported as identical, which is correct — JSON objects are unordered by definition.
- How are arrays compared?
- By position. That means inserting an item at the front shows every later index as changed. Detecting the insertion instead is a much harder problem and any solution guesses at intent, so this compares by index and tells you it does.
- What is a type change?
- The value at a path changed kind rather than content — a number became a string, or an object became null. It is called out separately because it is usually a serialisation bug rather than a deliberate edit, and it is easy to miss among ordinary changes.
- Are my documents uploaded?
- No. Both are parsed and compared in your browser, which matters because API responses routinely contain real customer data.
Privacy
Everything happens locally. Your files are read by your own browser, processed on your device, and never uploaded — closing the tab is all it takes to erase them.
Related tools
Text Diff Checker
Compare two texts side by side and see exactly what was added, removed or changed.
CSV to JSON Converter
Convert CSV to JSON and back, with proper quoting, type inference and a table preview.
JSON Formatter
Format, validate and minify JSON with clear error positions.
JWT Decoder
Decode a JSON Web Token's header and payload, and verify an HMAC signature.
JSON to TypeScript
Turn an API response into TypeScript interfaces, with optional fields worked out from the sample.
JSON Tree Viewer
Explore large JSON as a collapsible tree, with search and copyable key paths.