JSON Compare
Compare two JSON documents and see line-by-line differences highlighted. Find changed values, added keys and removed fields in API responses quickly.
Original JSON
Stays in your browserChanged JSON
Stays in your browserCompares the data, not the text: key order is ignored and lists are compared position by position, or by a key such as id.
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
Next steps
Done here? Use the Send to… menu on the result to carry it on to JSON Editor or JSON Visualizer.
Online JSON Compare & Diff Tool
Comparing two JSON payloads by eye is slow and easy to get wrong. Paste an API response before and after a change, two config file versions, or two test fixtures, and this tool highlights exactly which lines were added, removed, or changed — useful for debugging why a response shape shifted or reviewing a config diff before deploying it. For code use the Code Diff Checker; for plain text and documents use Text Compare. It helps QA teams and API developers spot changed, added, or removed values between two JSON documents.
How to compare two JSON files online
Paste the original JSON into the left box and the changed version into the right box, then click Compare. Both sides are validated and pretty-printed first, so differences in spacing or indentation alone won't create false positives — you only see differences that reflect an actual change in the data.
Reading the diff result
Each changed line is marked with a + (added in the new version) or - (removed from the original), and a running count of additions and removals is shown above the diff. Unchanged lines are included for context, so you can see exactly where in the structure a change happened rather than just that something changed somewhere.
A note on key order
JSON objects have no inherent key order, so two objects with the same keys and values in a different order are the same data. Structural diff (the default) ignores key order but still treats the order of list items as meaningful, comparing them position by position, or by a key such as id if you fill in "Match list items by key". Text diff compares line by line, so a reordered key still shows up there.
Common use cases
- Reviewing exactly what changed in an API response before and after a backend deploy
- Comparing two versions of a configuration file before merging a change
- Diffing test fixtures to understand why a snapshot test started failing
- Spotting an unexpected field addition or removal in a webhook payload
Worked example
{"name":"Ada","age":30} against {"name":"Ada","age":31} shows only the "age" line as changed after both are pretty-printed to matching indentation. But {"name":"Ada","age":30} against the key-reordered {"age":30,"name":"Ada"} — identical data, different key order — shows no differences in Structural diff, but both lines as changed in Text diff. The first pair in Structural diff is listed as $.age: 30 → 31.
Common mistakes and edge cases
- This tool shares the same line-diff engine as Diff Checker and Text Compare — checked against the source. The JSON-specific difference is that both sides are beautified to consistent indentation first, so only real data differences (not formatting) show up.
- In Text diff mode key order still counts as a difference. Switch to Structural diff to ignore it.
- In Structural diff, list items are compared by position unless you give a key. If items were inserted at the start, every later item looks changed; fill in "Match list items by key" (for example
id) to avoid that. Matching by key only applies when every item in both lists is an object with a different, plain-text or number value for that key. - The exported JSON Patch always works by position, so it can be longer than the list shown when you match by key.