How to compare two JSON files
- Paste the older version on the left and the newer one on the right, drop a file on each side, or use Upload.
- The comparison runs as you type. The format is detected automatically, or pick JSON, XML or Text yourself.
- Read the Changes tab for a list of differences, or switch to Side by side to see them in context.
Structure, not text
A plain text diff flags every line that moved or was re-indented. That's noisy for JSON, where these two are the same data:
{"name": "Ada", "role": "admin"} {
"role": "admin",
"name": "Ada"
} This tool parses both sides and compares the values, so it reports "no differences" here. What it does report is listed by path, for example $.items[1].qty changed from 2 to 3, which you can paste straight into a test or a bug report.
Reading the results
- Added: the key or array item exists only in the changed version.
- Removed: it exists only in the original.
- Changed: it exists in both, with a different value or type. A number that became a string, like
42→"42", counts as changed. - Key order: only shown when "Ignore key order" is off, if the same keys appear in a different order.
Numbers are compared by value, so 1.0 and 1 are equal, while large IDs like 12345678901234567890 are compared digit by digit so they are never rounded.
Comparing XML
XML is compared the same way after it is converted to a tree: elements become keys, repeated elements become arrays and attributes become fields that start with @, so an attribute change shows up as a path like $.order['@id']. Whitespace between tags and different indentation don't count as changes.
Where it helps
- Checking what changed in an API response between two releases.
- Reviewing a config change before deploying it.
- Finding why a snapshot test failed without scrolling through a thousand-line text diff.
Frequently asked questions
Does key order count as a difference?
Not by default. JSON objects have no meaningful key order, so "Ignore key order" is on. Turn it off if you need to know that keys were rearranged, for example when a test compares raw text.
How are arrays compared?
Items are matched by content first, so inserting one item in the middle shows up as one addition instead of making every later item look changed. Items that don't match anything are compared position by position.
Is my data uploaded anywhere?
No. The comparison runs entirely in your browser. Your two inputs are saved in this browser's local storage so they survive a refresh; Clear removes them.
Can I compare plain text or config files?
Yes. Choose Text as the format, or paste anything that isn't JSON or XML, and you get a line-by-line diff. Turn on "Ignore whitespace" to skip differences in spacing and indentation.