Skip to content
Toolew.com

JSON Tree Viewer

Explore JSON as a collapsible tree, search keys and values, and copy the JSONPath or JavaScript path of any node.

Runs in your browser. Your data is not uploaded.
Loading tool…

This guide is not yet available in your language and is shown in English.

Tool guide

What this tool does

JSON Tree Viewer displays a JSON document as an interactive, collapsible tree with colour-coded types and item counts. You can search keys and values, expand or collapse everything, and click any node to copy its JSONPath, JavaScript accessor, JSON Pointer or value.

Even well-formatted JSON becomes hard to navigate once it runs to thousands of lines. Finding where a field lives, how deeply it is nested or what the exact path to it is, so you can reference it in code, usually means scrolling and counting brackets. Writing data.orders[3].lines[0].sku by hand is a common source of off-by-one bugs.

The tree viewer parses your JSON and draws it as a hierarchy you can fold and unfold. Strings, numbers, booleans and null are colour-coded, and collapsed objects and arrays show how many keys or items they contain. Large arrays are rendered 100 entries at a time with a “Show more” button, so a file with tens of thousands of records stays responsive. Search filters the tree to matching keys and values with their parents, and clicking a node shows its path in three notations ready to copy. Nothing is uploaded.

How to use JSON Tree Viewer

  1. Paste JSON into the JSON input box, open a file, or click Sample.
  2. Set “Expand levels on load” in Options to control how much of the tree opens automatically.
  3. Click the arrow next to an object or array to expand or collapse it, or use Expand all and Collapse all.
  4. Type in “Search keys and values” to show only matching nodes and their parents, with matches highlighted.
  5. Click a key or value to select it; the Selected node panel shows its JSONPath, JavaScript path and JSON Pointer.
  6. Use the copy buttons to copy a path or the value of the selected node as formatted JSON.

Tips for better results

  • Search is case-insensitive and matches both key names and primitive values, so searching for an ID finds the record that contains it.
  • The JSONPath shown can be pasted straight into the JSONPath Tester to build a wider query.
  • JSON Pointer paths (RFC 6901) are what JSON Patch and many schema tools expect, for example /orders/0/total.
  • For very large arrays, search first rather than expanding everything, to keep rendering quick.

Common use cases

  • Understanding the shape of an unfamiliar API response before writing client code.
  • Locating a specific field in a large configuration or export file.
  • Copying exact accessor paths for templates, mapping rules or test assertions.
  • Checking how many items an array holds without counting by hand.

Common mistakes to avoid

  • Pasting invalid JSON and expecting a partial tree; fix the reported error first, or enable relaxed mode for comments.
  • Using the JavaScript path with a different variable name; replace “data” with whatever holds your parsed object.
  • Confusing array indexes with positions: indexes start at 0, so the third item is [2].

Frequently asked questions

Can the viewer handle large JSON files?

Yes. Only expanded nodes are rendered, and long arrays and objects show 100 children at a time with a button to reveal more, so documents of several megabytes remain usable.

What is the difference between JSONPath and JSON Pointer?

JSONPath, such as $.orders[0].total, is a query language that can also select many nodes with wildcards and filters. JSON Pointer, such as /orders/0/total, identifies exactly one location and is used by JSON Patch.

Does search look inside values?

Yes. It matches key names and the text of strings, numbers, booleans and null values. The tree then shows only matching nodes and their ancestors.

Is my JSON sent to a server?

No. Parsing and rendering happen entirely in your browser, which makes the viewer safe for internal API responses and personal data.

Feedback & suggestions

Help us improve JSON Tree Viewer. We read every message.

Rating (optional)
Necessary
Required for security, language and theme preferences. Always on.