Local JSON tool

JSON Tree Viewer

A JSON tree viewer draws objects and arrays as branches you can fold. This page starts in that view and uses the same limits as the extension: depth, child counts, and groups of 80 entries.

Result

Runs in your browser. JSON is not uploaded. Privacy policy

How a branch is drawn

An object becomes a disclosure control labeled with its key, or with Object at the root. The badge looks like {12} when the object has 12 keys. An array uses [12] and the key is the index. A screen-reader label says the count in words, so the brace is not the only cue. Leaves are a single row: a key, then the value. Strings are quoted, numbers are not, and null is the word null.

The first three levels open on their own. Deeper levels stay closed until you toggle them or press Expand all. Collapse all closes every open branch and leaves the root summary visible, which is the top brace and the count. Children of a closed branch are built when you open it, so a deep document does not construct every row before you ask.

Long arrays

Each level shows 80 entries, then a Show more control for the remainder. The next click reveals 80 more. Expand all does not skip that control. It opens branches that are already built; it does not silently materialize tens of thousands of rows. If you know the index you want, search for it. The index is the key, so a query of 120 can surface that row even when it sits past the first group.

A document whose text is longer than 1.5 million characters does not draw the tree immediately. The input keeps the text, and Render tree is an explicit button. That matches the extension’s guard for a raw JSON page that would freeze the tab. Beautify and minify still run without that extra click, because they produce a string rather than a node per value.

Search and links

Search keeps a branch when its own key matches or when any descendant matches. Everything else is hidden, and the matching branches are opened. Matching is a case-insensitive substring on keys, indexes, and leaf text. It is not a JSONPath expression and it does not evaluate code. The query never leaves the tab.

Web addresses inside strings are links when they are http or https. Trailing punctuation that was not part of the URL stays outside the link. The JSON viewer is the same tree, introduced as a way to read a payload. This page is the reference for the fold, the chunk size, and the search. If the tree will not draw, the JSON validator names the line and column. The JSON formatter is the path back to indented text.

Root shapes

  • A root object is labeled Object and shows a brace count.
  • A root array is labeled Array and shows a bracket count.
  • A root string, number, boolean, or null is a single leaf with no disclosure control.
  • Copy always offers the two-space reprint of whatever parsed, including a root leaf.

Questions

Why does Expand all skip part of a long array?

Only the entries already built are opened. The rest stay behind Show more so a large array cannot freeze the tab. Search for an index or a value if you do not want to page through every group.

Does the tree reorder keys?

No. Object keys follow the order they had in the text. Array indexes follow the array. The viewer and the beautifier read the same parsed value.

Can I search with a path like $.users[0].id?

No. The field is a substring match against keys, indexes, and leaf values. It opens the branches that contain a hit and hides the rest.

What happens to a link in a string?

An http or https URL becomes a link that opens in a new tab. The JSON value is unchanged. Copy still returns the JSON text, not HTML.