VS Code Extensions
JSON Inspector

JSON Inspector

by jstoolsspace

Interactive JSON inspector — Tree, Raw and JSONPath query views. Lossless big-number handling, search, copy actions. Fully local.

Downloads

32

Rating

(0)

Version

0.2.0

Last updated

Jun 27, 2026

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).
  • FindCtrl/Cmd+F searches keys and values, with Next/Previous, match highlighting and auto-expansion of the matched node.
  • Lossless numbers — powered by lossless-json; the native JSON.parse is 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 .json file → Reopen Editor With… → JSON Inspector (it's registered with option priority, 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)

License

MIT

Related extensions