JSON Diff
Paste two JSON documents to see added, removed and changed fields with their exact paths. Both sides are compared locally in your browser — nothing is uploaded.
JSON diff in one line: parse both documents, then walk the tree comparing keys and values. Each difference is reported with a path such as $.user.name, so you can jump straight to the field instead of reading both files.
✅ Quick Answer
Whitespace and key order do not matter — both sides are parsed first. Array order does matter, because items are compared by position.
Frequently Asked Questions
What does a JSON diff tool do?
It compares two JSON documents and lists what changed between them: keys that were added, keys that were removed, and values that are different. Each difference is shown with its JSON path (for example $.user.name) so you can find the exact field instead of scrolling through both files.
Do the two documents need identical formatting?
No. Both sides are parsed as JSON first, so indentation, line breaks and key order do not affect the result. Two documents that are formatted differently but contain the same data show no differences.
Does the order of array items matter?
Yes. Arrays are compared position by position, so moving an item changes its index and is reported as a difference. This matches how most APIs treat arrays, where order is significant. Object key order, by contrast, is ignored.
Is my JSON uploaded?
No. Both documents are parsed and compared in your browser. Nothing is sent to a server, which makes the tool safe for API responses, config files and other data you would not paste into an online service.
What happens if one side is not valid JSON?
The tool reports which side failed and stops before comparing, because a partial comparison would be misleading. Fix the syntax first — the JSON Formatter can point at the exact line and column of the error.
Can it compare very large documents?
It handles documents as large as your browser's memory allows, but a very large diff produces a long list. For multi-megabyte payloads, compare a filtered subset (the fields you care about) rather than the whole document.
JSON Diff — Spot Changes Between Two Documents
When an API starts returning something unexpected, the fastest question is usually "what changed?". A JSON diff answers it without you reading two large payloads side by side: paste the version that worked and the version that did not, and the tool lists every added, removed and changed field with a path you can search for in your code.
How the comparison works
- Both documents are parsed first, so formatting and key order never create false differences.
- Objects are compared key by key; a key that exists on one side only is reported as added or removed.
- Arrays are compared by position, so an inserted item shifts the indexes after it.
- Values of different types (for example
1vs"1") are reported as a change, not a match.
When to use it
Typical uses are diffing two API responses after a deploy, comparing a config file before and after an edit, checking what a migration actually changed, and verifying that a serializer round-trips your data unchanged. If a value looks identical but is flagged, check its type — false and "false" are different JSON values.
Working with the documents before comparing? The JSON Formatter validates and pretty-prints each side, the JWT Decoder reads tokens inside a payload, and the Base64 Encoder handles encoded fields.