JSON Compare & Diff
This JSON compare tool parses two documents and walks them key by key, reporting every difference as the path where it occurs rather than as a line number. Because the comparison is structural, reordered keys, different indentation and reflowed line breaks are ignored — only genuine differences in keys and values are reported. Results are grouped into added, removed and changed, each with the original and modified value side by side, and can be filtered to one kind at a time. Both documents stay in your browser.
How it works
Paste one document on each side. The comparison is structural, not line-by-line: key order, indentation and line breaks are ignored, so only real differences in keys and values are reported. Each result shows the accessor path where the two documents disagree, like $.engines.node or $.keywords[3]. Array items are matched by position.
Both documents stay in your browser — nothing is uploaded to compare them.
Paste JSON into both panels to see the differences.
How to compare two JSON files
- Paste the original document into the left panel.
- Paste the version you want to check into the right panel.
- Differences appear below as a table of paths, each marked added, removed or changed.
- Use the filter chips to look at just one kind of change.
Why a structural diff beats a text diff
A plain text diff reports every reformatted line, so reordering keys or switching from two-space to four-space indentation lights up the whole file even though the data is identical. This comparison parses both documents first, then walks them key by key — so key order, whitespace and line breaks are ignored, and only genuine differences in the data are reported.
Common use cases
- Finding what changed between two API responses captured before and after a deploy.
- Diffing two config files or feature-flag payloads across environments.
- Checking that a serializer rewrite produced the same output as the old code.
- Reviewing a lockfile or manifest change without the noise of reordered keys.
Frequently asked questions
How do I compare two JSON files?
Paste the original document into the left panel and the modified one into the right panel. The differences appear below as a table of paths, each labelled added, removed or changed, with both values shown.
Does key order affect the comparison?
No. Both documents are parsed before comparing, so the order in which keys appear is irrelevant — two objects with the same keys and values are reported as identical no matter how they were serialised.
How is this different from a text diff?
A text diff compares lines, so reindenting a file or reordering its keys makes the whole document look changed. This tool compares the parsed data, so formatting is invisible and only real differences in keys and values are reported.
How are arrays compared?
Array items are matched by position, so the first item is compared with the first item, the second with the second, and so on. Inserting an item at the start therefore reports every following position as changed — sort both arrays first if order is not meaningful in your data.
What does a path like $.keywords[3] mean?
It is the accessor path from the document root to the value that differs: $ is the root, .keywords selects that key, and [3] selects the fourth item of the array. You can paste the same expression into code to read the value.
Are the documents I compare uploaded anywhere?
No. Both documents are parsed and compared entirely in your browser, so nothing is transmitted, logged or stored on a server.
Related tools
JSON Formatter & Beautifier
This JSON formatter beautifies minified or messy JSON online with clean indentation, line numbers, and code folding.
JSON Sorter
This JSON sorter alphabetises object keys at every level of nesting so two files diff cleanly.
Text Diff / Compare
A text diff tool that compares two blocks of text side by side and highlights every line added, removed, or unchanged.