JSON diff
original.json
changed.json
Why not a text diff
Running diff over two JSON files answers the wrong question. Re-serialising the same data with a different indent, or with keys in a different order, produces a wall of changed lines that mean nothing. What you actually want to know is which paths changed value.
So the question of whether the two documents differ at all is answered structurally: both are parsed and walked together, and a different indent or key order is not a difference. When they do differ, the lines carrying the difference are marked where they sit, in the editors themselves — the original line green on the left, the changed line red on the right.
How the comparison works
- Objects are walked by key. A key in one document only, or a key whose value differs, marks the line it is written on.
- Arrays keep their order, and the longest run of matching lines stays unmarked — inserting one element marks that element, not everything after it.
- Formatting alone is never a difference. Reindent one side, or reorder its keys, and nothing is marked.
One scroll, two documents
Scrolling either pane drags the other with it, so the line you are reading on the left stays level with the line facing it on the right. Both panes stay editable the whole time — type in either one and the marks catch up as you go.
Typical uses
- Confirming an API response did not change shape between two deploys.
- Checking that a config refactor changed nothing it was not supposed to.
- Verifying a conversion round trip — take a document throughYAML and back, then compare it against the original.
- Finding which field differs between a working request and a failing one.
Common questions
Why does it say identical when the two texts clearly differ?
Because the comparison is structural, not textual. Different indentation, different key order, and 1.0 versus 1 are all the same data, so they are not reported. That is the point — a line-based diff of two JSON files is mostly noise.
How are arrays compared?
In order, but an inserted element does not shift everything after it — the longest matching run is kept aligned, so adding one item to a long list shows as one added element rather than a hundred changed ones. Reordering a list is still a real difference, because order is part of the data in a JSON array.
How do I read the colours?
Each difference is marked on the line where it happens, right in the editor: the original line green on the left, the changed line red on the right. A line only one document has — a key added or removed — is marked on that side alone. Scrolling either pane scrolls the other, so the two stay level.
Is anything uploaded to compare it?
No. Both documents are parsed and compared by JavaScript in your own browser, exactly like every other tool here. Nothing is sent anywhere, which matters when the two things you are comparing are production API responses.
The rest of the toolkit
Same engine, same privacy — every page runs entirely in your browser.
JSON formatter
Indent JSON with 2 spaces, 4 spaces, or tabs, then copy or download the result.
JSON viewer
Expand, collapse, and search a JSON tree; copy any value or its path.
JSON validator
Find syntax errors with exact line, column, and a suggested fix.
JSON minifier
Strip whitespace and see the byte savings before and after.
JSON beautifier
Turn minified or broken JSON into clean, highlighted output.
JSON pretty print
Readable indentation with optional deep key sorting.
JSON to CSV
Flatten an array of objects into spreadsheet rows, quoted correctly.
CSV to JSON
Parse CSV — quotes, embedded commas, any delimiter — into JSON records.
JSON to YAML
Config-ready YAML with no folded strings and no anchors.
YAML to JSON
YAML 1.2 parsing, multi-document streams, errors reported by line.
JSON to XML
Arrays repeat their tag; @keys become attributes.
XML to JSON
Entities, CDATA, and namespaces handled by the browser’s XML parser.