Inspect JSON as an interactive Tree, view the Raw text, or run JSONPath queries — right inside VS Code. Big integers and high-precision decimals are kept lossless, and everything runs locally (no network, no telemetry).
Features
- Tree view — collapsible objects/arrays, type-colored keys/strings/numbers/ booleans/null, item counts, Expand all / Collapse all, lazy rendering for large files, and per-node actions (copy value / key / object / JSONPath / JSON Pointer, expand / collapse subtree).
- Raw view — Beautify, Minify, word-wrap toggle, and Copy. Re-serialization is lossless (numbers and key order preserved).
- Query view — JSONPath with a live match count, results list, copy value/path,
and a local history of the last 10 queries. The engine is dependency-free and
safe (no
eval/Function). - Find —
Ctrl/Cmd+Fsearches keys and values, with Next/Previous, match highlighting and auto-expansion of the matched node. - Lossless numbers — powered by
lossless-json; the nativeJSON.parseis never used for your data. - Tolerant parsing — non-breaking spaces and other Unicode whitespace used for indentation (a common copy/paste artifact) are normalized before parsing, while string contents are preserved exactly.
How to use
- Custom editor: right-click a
.jsonfile → Reopen Editor With… → JSON Inspector (it's registered withoptionpriority, so it never hijacks your default JSON editor). - Command:
JSON Inspector: Open Current File(Command Palette or the editor title bar on JSON files). - Selection: select JSON in any file → right-click → JSON Inspector: Open Selection.
The custom editor is a viewer and re-renders when the document changes; edit the raw file with Reopen Editor With… → Text Editor.
Privacy & security
No network requests, no telemetry, no eval. JSON is processed locally; clipboard
writes go through VS Code's clipboard API. The webview runs under a strict Content
Security Policy with a per-load nonce.
Build from source
npm install
npm run build # type-check + bundle host (out/) and webview (media/)
npm test # unit tests for the core (parser, paths, search, JSONPath)
npm run package # produce a .vsix (requires @vscode/vsce)