Compare two JSON files (diff)¶
diff compares two JSON or JSON Lines files record by record, matching records by a key
rather than by line, so records that were merely reordered are not reported as changes.
--key idmatches records by theiridfield (use any field, or a dotted path).- The output lists added, removed and changed records, and for changed records, which fields differ.
--exit-codemakes the command return a non-zero status when there are differences — handy in CI pipelines and scripts:
In the desktop app¶
Open one file, then use Compare… to pick the second. The differences are shown side by side, grouped into added / removed / changed, with the changed fields highlighted.

Related¶
- Repair broken JSON first, if one of the files is invalid.
- Split and merge JSON files.