How to use the JSON tree viewer tool
- Paste a JSON document into the JSON box.
- Select Build tree. Select Example instead to load a small nested sample.
- Read the outline in the Result box. Each level of nesting adds two spaces of indent.
- Select Copy to take the tree as plain text for a ticket, review comment or note.
How to read the JSON tree
The tree is plain text. Every container gets a row that says Object or Array, followed by the number of direct children in parentheses. Every scalar gets a row with its value written as JSON, so strings keep their quotes and null, true and false appear as literals.
Object members are labeled with the quoted key and a colon. Array elements are labeled with their zero-based index in square brackets, the same number you would use to reach the element in code.
Worked example of a nested document
Three facts are visible at a glance here that are easy to miss in minified text: the root has three members, roles holds two strings, and tags is present but empty.
{"user":{"id":7,"roles":["admin","dev"],"manager":null},"tags":[],"ok":true}
Object (3)
"user": Object (3)
"id": 7
"roles": Array (2)
[0] "admin"
[1] "dev"
"manager": null
"tags": Array (0)
"ok": trueValues are parsed, so some details are normalized
Whole-number literals retain their original integer value, including IDs beyond JavaScript’s safe integer range. Ordinary decimals display in compact form.
If a key occurs twice in one object, only the last value is listed. Keys that look like non-negative integers are moved ahead of the other keys and sorted numerically, because that is JavaScript's property order. For exact source text use the formatter; for structure use the tree.
Size limits and errors
The viewer stops with the message Choose a smaller JSON document for the tree. when the outline would exceed 5,000 rows or when nesting goes deeper than about 80 levels. Invalid JSON is rejected with the browser parser's error message. To survey a larger file, paste one branch of it, for example a single element of a long array.
Where a tree view saves time
An outline answers questions about shape faster than reading braces and brackets does.
- Checking how many records an API page returned without counting brackets.
- Finding the path to a deeply nested field before writing an accessor or a jq filter.
- Comparing the structure of two webhook payloads as text.
- Documenting a response layout in a ticket or design note.
Frequently asked questions
Can I expand and collapse nodes?
No. The result is a static text outline in a read-only box, not an interactive widget. Every node is shown expanded, which is why large documents are capped at 5,000 rows.
What does the number in parentheses mean?
It is the count of direct children: members for an object, elements for an array. Nested descendants are not included, so an array of two large objects still shows Array (2).
Can I inspect a large integer ID?
Yes. For example, the tree displays 9007199254740993 with its final digit intact. An unsupported conversion reports an error before displaying an inaccurate value.
Does the JSON tree viewer upload my data?
No. The document is parsed and laid out by JavaScript in your browser tab. Building a tree does not send the document, or anything derived from it, over the network.
Can it show JSON with comments or trailing commas?
No. Input must be strict JSON. Remove comments and trailing commas first, or run the text through the JSON repair tool on this site and paste the repaired output here.