JSON tree viewer
Explore JSON interactively with a collapsible tree, type-coded values, and per-node JSONPath copy.
A pretty-printer turns one long line into two thousand, which is progress but not an answer. This viewer parses what you paste with the browser JSON parser and renders it as a collapsible tree instead: objects and arrays show their key or item count before you open them, strings are green, numbers amber, booleans indigo and null grey-italic, and every node carries a copy button that yields its JSONPath, such as $.data.items[3].id. A search box filters the tree by key or value, a type dropdown narrows it to one JavaScript type, and the header keeps a running key count, maximum depth and byte size for whatever is currently in the box.
Key facts about JSON tree viewer
| Parser | The browser built-in JSON.parse. Parse errors are shown verbatim, including the character position the engine reports |
|---|---|
| Input | Paste or type into the textarea, or use the Paste button to pull from the clipboard. There is no file picker — this tool is for text you already have |
| Path format | JSONPath in dot-bracket form: the root is $, object keys append .key, array items append [index] |
| Counters | Total keys counted recursively (array items included), maximum nesting depth, and the byte size of the raw text measured with Blob |
| Type colouring | string, number, boolean, null, object and array each get their own colour so a numeric string stands out from a number |
| Render depth | Levels beyond 10 are collapsed behind a marker rather than rendered — deep documents stay readable and fast |
| Long strings | Values over 150 characters are clamped to one line and expand in place when clicked |
| Search | Matches keys, string values and numbers, case-insensitive; a parent stays visible when any descendant matches |
| Type filter | Show only nodes of one type; containers are kept when they hold a match, so filtering to number reveals where the numbers live |
| Expand state | Expand all walks the whole document and opens every path; collapse all returns to the root node |
What happens to your file
Everything happens in this tab. The text you paste is parsed by the browser own JSON.parse call and rendered into the DOM; it is never sent to a server, never written to storage, and never logged. The Paste button uses the clipboard permission your browser asks for, and the copy-path button writes a short string back to your clipboard — both are local operations. Because the document lives only in the page, reloading the tab clears it, which is the right behaviour for an API response that happens to contain a token or a customer record.
About this tool
- 1
Paste the JSON
Drop an API response or a config file into the textarea. The tree redraws as you type, so a missing bracket surfaces immediately as a parse error with the position the engine reports.
- 2
Read the header counters
Key count, depth and byte size appear under the box. Depth is the number that predicts pain: a document 14 levels deep is why your mapping code keeps failing.
- 3
Open the branch you care about
Click a key to expand it. Collapsed objects and arrays show how many keys or items they contain, so you can skip a 400-item array without opening it.
- 4
Search or filter
Type in the search box to keep only branches whose key or value matches, or pick a type to see only strings, numbers, booleans, nulls, objects or arrays.
- 5
Copy the path
Hover a node and press its copy button to put the JSONPath on your clipboard, ready for a jq expression, a JSONPath query or an index into your own code.
| Input method | Textarea, clipboard paste, or the Paste button |
|---|---|
| Accepted content | Any valid JSON document: object, array, string, number, boolean or null at the root |
| Maximum render depth | 10 levels; deeper nodes are summarised |
| Inline string clamp | 150 characters |
| Path syntax | $.key.sub[0].leaf |
| Filter types | string, number, boolean, null, object, array |
| Browser support | Any modern browser; clipboard read needs permission, everything else does not |
| Cost / account | Free, unlimited, no signup |
- Expand all then search is the fastest way to find every occurrence of a key name in a large document.
- The key counter counts array items too, so a document with 12 keys and 8,000 counted keys is mostly one big array.
- Filtering to null is a quick audit for fields an API is failing to populate.
- A value shown in green with digits inside is a string, not a number — that colour difference catches the classic id-as-string bug before your parser does.
- Click a long string to unclamp it in place instead of scrolling the raw text in the textarea.
- If the tree stops at a line saying deeper levels are hidden, the document is more than 10 levels deep — copy the path at that point and inspect that subtree on its own.
- The copied path is dot-bracket JSONPath, which pastes straight into most JSONPath testers and into JavaScript with only the leading $ removed.
- Collapsible tree with key and item counts
- Per-type colour coding
- JSONPath copy on every node
- Key, value and type search
- Type filter
- Key count, depth and byte size
- Expand all and collapse all
- Clipboard paste
- Reading an API response that arrived as one unbroken line in a terminal.
- Finding the exact path to a nested field so you can write the accessor once and correctly.
- Checking which fields in a payload came back null before filing a bug against the API.
- Measuring how deep a configuration file has grown before refactoring it.
- Spotting numbers that are actually strings in a response you are about to parse.
- Explaining a payload structure to someone else by expanding just the branch that matters.
Related tools
View allPart of File viewers that open the file in your browser
Works well with this5
Other JSON tools11
More file viewers10
More in Data & Dev2
Updated