JSON Compare: Find the Differences
Paste two versions of a JSON document to see exactly what changed. They are compared by value, not as text, so reordered keys and different indentation do not show up as changes. One of our free JSON tools.
Original
Changed
Differences
Paste JSON on both sides to compare.
How to compare two JSON documents
- Step 1
Add both versions
Paste or drop the original on the left and the changed version on the right.
- Step 2
Read the changes
Each added, removed or changed path is listed with its value before and after.
- Step 3
Export the result
Copy or download the list of changes as JSON, or switch to the text view.
Worked example
The second document reorders its keys, which a line-by-line diff would flag on almost every line. The semantic comparison lists only the four real changes.
{
"id": 7,
"plan": { "name": "Starter", "price": 9 },
"tags": ["a", "b"],
"trial": true
} {
"plan": { "price": 12, "name": "Starter" },
"id": 7,
"tags": ["a", "b", "c"],
"billing": "monthly"
} changed $.plan.price 9 → 12
added $.tags[2] "c"
removed $.trial true
added $.billing "monthly"
(id and plan.name moved but are unchanged,
so they are not listed) Comparing values, not lines
A plain text diff compares two files line by line. For JSON that is noisy: if one side was formatted with four spaces and the other with two, or a serializer wrote the keys in a different order, nearly every line differs even though the data is identical. This tool parses both documents first and compares the resulting values. Object keys are matched by name wherever they appear, whitespace is irrelevant, and numbers are compared by value, so 1.0 and 1 are equal. What is left is a list of real differences.
Reading the change list
Each change has a kind, a path and the values on each side. Added means the path exists only in the changed document, removed means it exists only in the original, and changed means it exists in both with different values. A change of type, such as the string "42" becoming the number 42, counts as changed, which is useful for catching serializer bugs. When a whole object is added or removed, it is listed once at its own path rather than once per field. Paths use JSONPath notation, such as $.plan.price, so you can find them with the JSON viewer or in code.
Arrays: by position or by value
By default, array items are compared by position: item 0 with item 0, item 1 with item 1, and any extra items at the end are added or removed. That is right for ordered data such as steps, rankings or time series. When order does not matter, as with tags, permissions or a set of IDs, tick Ignore array order. Items are then matched by value wherever they are, and only items that have no equal on the other side are reported. Inserting one item at the start of a long list then shows as one addition instead of a change on every following index.
Side-by-side text view
Switch to Side by side text to see a line diff of both documents after they have been pretty-printed with keys sorted. Because both sides are normalised first, only lines whose content changed are highlighted, in green for added and red for removed. It is useful when you want to see a change in the shape of the document, for example a new nested block.
Exporting and privacy
Copy changes and Download give you the change list as a JSON array, ready to attach to a ticket or feed into a test. Both documents are compared inside your browser. JSONC input with comments and trailing commas is accepted, so you can compare config files directly. For general text, use the Diff Viewer.
Questions and answers
Does key order matter?
No. Both documents are parsed and compared by value, so {"a": 1, "b": 2} and {"b": 2, "a": 1} are equal. Whitespace and indentation are ignored too.
Can I compare arrays regardless of order?
Yes. Tick Ignore array order and items are matched by value wherever they appear. Leave it off for lists where position matters, such as steps or rankings.
What counts as changed?
A path whose value is different on each side, including a change of type, such as "42" becoming 42. Keys present on only one side are listed as added or removed.
Can I compare JSON with comments?
Yes. Comments, trailing commas and single quotes are accepted on both sides, so you can compare JSONC config files such as tsconfig.json directly.
Are my files uploaded?
No. Both documents are parsed and compared inside your browser. Nothing leaves the page.
Related tools
All JSON & Schema toolsNext step
Need this built into your stack?
The team behind SyntaxSnap builds custom code generators, internal developer tools and API integrations.