Skip to main content
WizTools123
WizTools123
Free Online Tools

Tool Categories


JSON Tools New Tool

Free Online JSON Diff, Compare Two Documents By Structure

Compare two JSON documents in your browser and get a list of what actually changed, by path. Because the comparison walks both trees rather than the text, reordered keys and different indenting are not reported as differences. Values whose type changed are listed separately, since that is the change that breaks code quietly.

Free Forever Nothing Uploaded Structural, not text Reported by path
Free Online JSON Diff, Compare Two Documents By Structure
Share this tool
Advertisement Slot (Top Banner) Google AdSense Unit • Responsive Banner
JSON Diff and Compare Your file is read inside this tab. Nothing is uploaded anywhere.
Drop the first JSON file here Or paste it below. The second document goes in the box after that. Choose a file Up to 15 MB per file. Nothing is uploaded.
0%
Or paste it
The second document
Reading
Comparing
Ignore these paths Useful for timestamps and request ids that change on every call.
The report

0 added 0 removed 0 changed 0 changed type

The differences
0 characters 0 lines 0 B
Buy Us A Coffee

Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.

Buy Us A Coffee
Sponsored Content (Below Tool) Google AdSense Placement

How to Compare Two JSON Documents

A few steps, and nothing is uploaded.

1
Put the first document in Paste it or drop a file. The sample pair is already loaded, with a few differences of each kind to look at.
2
Paste the second one below Two boxes rather than two files, because comparing two API responses usually means two things on the clipboard.
3
Decide about array order Leave it on position for a list where order matters, such as steps. Switch it off for a set of tags or ids, where order means nothing.
4
Read the table, or take a patch The readable list is for a person. The JSON Patch output is for applying the change somewhere else.

What to Know About Comparing JSON

Why a text diff misleads, and what array order means.

A text diff on JSON is mostly noise, and that is the reason this page exists. Reorder the keys and every line looks changed. Change the indent from two spaces to four and the whole file is different. Add one key and the diff shows the lines around it too. None of that is a change in the data, and all of it hides the one change that is.
A type change is listed on its own because it is the dangerous one. An id that was the number 1007 and is now the text "1007" looks almost identical in any report, passes most validation, and breaks the first piece of code that compares it to a number. Keeping those separate from ordinary value changes means you see them.
Array order is a real decision, not a detail. Compared by position, moving one item in a list of twenty reports nineteen changes. Compared as a set, the move is reported as nothing at all. Which is right depends entirely on whether your array is a sequence or a bag, and only you know that.
Ignoring paths is what makes this usable on live responses. A timestamp or a request id differs on every single call, so without a way to exclude them every comparison reports a difference and you learn nothing. Name those paths and they are left out of the count as well as the list.
JSON Patch output follows RFC 6902 and is deliberately literal. It describes add, remove and replace operations on paths, which is what a server expects, and it makes no attempt to be clever about moves. A patch that tries to detect moves can be shorter and is much harder to verify.
Comparing by set has a cost on large arrays. Each item has to be checked against the remaining items, so a thousand element array is a million comparisons. It is fine on normal data and slow on very large lists, which is why it is off by default.

Key Features & Capabilities

What this tool does, and what it deliberately does not.

Structural comparison Both trees are walked, so key order and formatting never appear as differences.
Type changes separated A number becoming text is called out on its own, because it is the change that quietly breaks code.
Arrays as sets Ignore position for the arrays that are really bags of tags or ids.
Ignore noisy paths Exclude timestamps and request ids so a live comparison reports only real changes.
JSON Patch output An RFC 6902 patch of add, remove and replace operations, ready to apply elsewhere.
Nothing is uploaded Both documents are parsed in this tab, so production responses stay put.

About the JSON Diff

Comparing two JSON documents with a text diff is one of those habits that feels productive and wastes an afternoon. The tool is right there, it runs instantly, and it reports fifty differences in two files that are identical apart from the order their keys happen to be written in. JSON objects have no defined order, so a server is free to emit the same data in a different sequence on every call, and a line based diff cannot tell the difference between that and a real change.

Walking the parsed trees instead gives a short answer: these keys were added, these were removed, these values changed, and here is the path to each. The report is about the data, which is what you were asking about. It also means the output is stable: run it twice on the same pair and you get the same list, which a text diff does not guarantee when formatting varies.

The one thing worth separating out is a change of type. When a field that held the number 1007 starts holding the string "1007", nothing looks broken. The document is valid, the value reads the same to a human, and most schema checks let it through. The code comparing it to a number stops working and the bug surfaces somewhere else entirely, which is why those changes get their own list rather than being mixed in with ordinary edits.

Frequently Asked Questions

Key order, arrays, types and large documents.

Because it compares lines. Reordered keys, different indenting and reformatting all change the text while leaving the data identical. This page compares the parsed documents, so only real changes appear.

It depends on what the array is. A list of steps or ranked results is a sequence, so position matters. A set of tags or ids is a bag, where moving an item means nothing. Leave it on position unless you know the array is a set.

Because they are the ones that break things quietly. A number that became text reads identically in a report and passes most validation, then fails in the code comparing it to a number. Keeping them apart makes them impossible to miss.

Put the timestamp path in the ignore box, such as $.meta.requestId or $.updatedAt. It is left out of both the list and the counts, so the comparison tells you about the data rather than about the clock.

Applying the change somewhere else. It is a standard list of add, remove and replace operations on paths, which many APIs and libraries accept directly.

On large arrays, yes, because every item has to be checked against the remaining ones. On normal sized data it is instant. That is why it is off unless you ask for it.

Other JSON Tools

Advertisement Slot (Bottom Banner) Google AdSense Unit • Responsive Banner