About the JSON Diff
A line-by-line diff of two JSON files is noisy: a re-indented file or a reordered key shows as a wall of changes even when no value differs. This tool compares the parsed structure instead. Both documents are parsed, normalised and compared value by value, so only genuine differences, a changed number, an added key, a removed array item, are highlighted. Removals appear in amber and additions in green, in the same style as a code review.
Switch to line mode when you do want a textual comparison, for example to check a formatting change or to diff a file that is not quite valid JSON. In structure mode a document that fails to parse is reported with the line and column of the problem, the same way the JSON Validator reports it.
The status line counts changed chunks and the Download button saves a unified patch. Both documents stay in your browser, so comparing API responses containing tokens or personal data is safe. To normalise a document before a text diff elsewhere, the JSON Sorter orders keys consistently.
How to use
- Paste the original JSON on the left and the changed JSON on the right, or click Sample.
- Leave Structure selected to ignore formatting and key order, or choose Lines for a text comparison.
- Read the highlighted differences. Download saves them as a patch.
Common questions
- Does key order count as a difference?
- Not in structure mode. Keys are compared by name, so two objects with the same keys in a different order are identical. Line mode treats them as text.
- Why does it say my JSON is invalid?
- Structure mode must parse both documents. The message names the line and column of the first syntax error; fix it or switch to line mode.
- Can it compare very large files?
- Documents of several megabytes compare in a second or two. The highlighted view can get long; the patch download stays practical.
- Is anything uploaded?
- No. Parsing and comparison run in your browser.