← All extensions
JSON Viewer
ivyx✓
Format, validate, repair and browse JSON as a tree without pasting it into a website
JSON Viewer
Format, validate, repair and browse JSON as a tree, without pasting it into a website.
What you can do
- Run JSON: New Scratch Tab from the palette and paste JSON from a log, an API response or a message
- Format with two spaces, four spaces or tabs, or minify to one line
- See exactly where invalid JSON breaks, marked in the text with a sentence that says what is wrong
- Repair almost-JSON in one click: trailing commas, single quotes, comments,
unquoted keys and Python's
True,FalseandNone - Browse the tree beside the text, and click a row to select its source
- Copy a row's path (
$.xl.sets[0][0]), its value or its key from the row's ⋯ - Read a string that holds JSON, such as
"{\"user\":…}", as a tree of its own - Search keys and values, or narrow the tree with a JSONPath such as
$.items[?(@.price < 10)] - Sort keys alphabetically at every depth, which makes two documents easy to compare
- Open JSON Lines (
.jsonl,.ndjson) with one record per root, and a broken line reported by its number while the rest still show
Notes and limits
- Numbers keep their digits. A 20-digit id stays the same id after formatting, where tools built on JavaScript's own parser round it, and the status line says when a document holds such a number
.jsonfiles stay with the code editor. Open one, then run JSON: Open in JSON Viewer to see it here; Cmd+S in that tab writes the file- A scratch tab has no file until you save it, and Cmd+S asks where
- Every button is a normal edit, so Cmd+Z undoes it
- Nothing leaves your machine: the extension has no network access
- Very large texts open with the tree collapsed
Getting started
Open the command palette, choose JSON: New Scratch Tab and paste.