VSCode Extension
Compare JSON is also available as a VSCode extension, powered by the same comparison engine as this website. It brings semantic JSON comparison into your editor: find what changed between two JSON documents, with control over how keys, values, and arrays are matched.
Installation
Search for Compare JSON (publisher: unitstack) in the VSCode Extensions view, or install it from the VSCode Marketplace.
Compare Two JSON Documents
- Open a JSON file.
- Run Compare JSON: Compare Active Editor with… from the command palette (
Ctrl+Shift+P/Cmd+Shift+P) or the editor title menu, then pick what to compare against: another open editor, a file on disk, or the clipboard. - The result opens in VSCode’s native diff editor, with both sides padded so corresponding keys line up — even when whole blocks were added or removed.
You can also right-click a .json file in the Explorer and choose Select for Compare, then Compare with Selected on the second file — the same flow as VSCode’s built-in file compare.
Difference Navigator
The Compare JSON sidebar view groups every difference by kind — Added, Deleted, Value Changed, and Type Changed. Click any entry to jump straight to that difference in the diff editor.
Comparison Options
The extension shares the same semantic options as the web app. Configure them per comparison with the Compare JSON: Configure Comparison Options command, or set workspace defaults in settings.json:
| Setting | Default | Description |
|---|---|---|
compare-json.arrayCompareMethod | byIndex | How arrays are compared: byIndex, lcs (minimal diff), or unordered (multiset match). |
compare-json.keyCaseInsensitive | false | Ignore case when matching keys. |
compare-json.valueCaseInsensitive | false | Ignore case when comparing string values. |
compare-json.numericStringEqualsNumber | false | Treat a numeric string like "1" as equal to the number 1. |
See Array Comparison Methods and Comparison Options for details on what each option does.