JSON Compare
Compare two JSON documents structurally: tree and side-by-side views, ignore key order or case, and a differences-only filter.
JSON Compare workspace
Original JSON
LeftChanged JSON
RightYour draft is kept in this tab only (sessionStorage) and disappears when the tab closes. .
Using JSON Compare
Paste the original document into the left pane and the changed one into the right.
Turn on Ignore key order when the two sides came from different serialisers, and Ignore case only where case is not data.
Press Compare JSON to walk both trees and classify every path.
Read the tree view for structure, or switch to the side-by-side view and tick Show Differences Only.
The comparison recurses through both documents key by key rather than aligning lines of text, so it distinguishes an added path from a removed one and flags a value whose type changed. Added, removed, changed and type-changed paths are colour-coded in a tree and in an aligned side-by-side view that always agree with each other.
Paste an original document on the left, the changed one on the right, and press Compare JSON. The result is a structural diff: it walks both trees key by key rather than lining up text, so a value that moved to a different position in the file is not reported as a change.
What counts as a difference
The walk recurses through objects and arrays and classifies each path into one of four outcomes:
- Added — the path exists on the right and not on the left.
- Removed — the path exists on the left and not on the right.
- Changed — both sides have the path but the values are not equal.
- Type changed —
"1"on one side and1on the other, which is the failure mode most likely to be silently breaking something downstream.
Array elements are addressed by index, so items[2].price is a path like any other. Inserting an element near the front of a long array therefore shifts everything after it and reports a great many differences; that is honest rather than helpful, and sorting both arrays by a stable key before comparing is usually the better move.
The two toggles, and when each one earns its keep
Ignore key order reorders every object alphabetically on both sides before anything is compared. Serialisers do not agree on key order — Python dictionaries, Go struct marshalling and a JavaScript object literal will emit the same data three different ways — and without this toggle a side-by-side view of two equivalent responses is a wall of red.
Ignore case lowercases both documents wholesale, keys and values alike. It is the blunter of the two and it is meant for one specific job: checking whether two configurations differ in substance when one system writes "Region": "US-East-1" and another writes "region": "us-east-1". Turn it off again before you compare anything where case is data, because it will hide a genuine change from Active to active.
Both toggles apply to the tree view and the side-by-side view at the same time. In an earlier build they were wired into only one of the two, so the panes could sit on screen contradicting each other about whether a document had changed.
Reading the two views
The tree view nests differences under their parent paths and shows a count on each branch, so you can collapse an untouched subtree and keep the shape of the change in front of you. The side-by-side view is line-oriented, with the left and right documents aligned and each differing row tinted.
Show Differences Only filters the side-by-side view down to changed rows plus two lines of context above and below each one. On a 4000-line configuration file with six real changes, that is the difference between a review you can do and one you will skim. Toggling it used to crash the pane outright, which is fixed.
Where this fits
The two documents most people compare here are an API response before and after a deploy, and a config file across two environments. For the first case, run both payloads through JSON Formatter with key sorting on before you paste them — a canonical shape on both sides makes the diff far shorter. For the second, remember that a diff can only tell you what changed, not which side is correct.
Neither document is transmitted anywhere; the comparison is arithmetic on strings in your own tab, with no request leaving the page. Both panes are remembered in sessionStorage while the tab stays open and are discarded when it closes, and the "Clear it now" link removes them on the spot if you have just pasted a production connection string.
Frequently asked
What does the Ignore key order toggle actually change?
It sorts every object alphabetically on both sides before anything is compared. Serialisers disagree about key order, so two equivalent API responses can look completely different line by line. With the toggle on, only genuine differences in data are reported.
Why does inserting one array element report so many differences?
Array elements are addressed by index, so an insertion near the front shifts every later element and each shifted position counts as a change. Sorting both arrays by a stable key before comparing usually gives a much shorter and more meaningful result.
Do the tree view and the side-by-side view ever disagree?
No. Both read the same normalised text, so the toggles apply to both at once. An earlier build wired them into only one of the two panes, which let the views contradict each other about whether the documents differed.
What does Show Differences Only leave on screen?
Every changed row plus two lines of context above and below it. On a long configuration file with a handful of real edits, that turns an unreadable wall into a reviewable list.