JSON Viewer – Tree Explorer

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

Drop a .json file here

or click to browse — read locally, max 20 MB

Root: object · 4 keys31 valuesmax depth 4
: {object · 4 keys
: "ok",
: {object · 3 keys
: 1,
: 2,
: 57
},
: [array · 2 items
: {},object · 6 keys
: {}object · 6 keys
],
: {object · 2 keys
: true,
: false
}
}

Tip: click any key (or $) to select it and copy its JSONPath.

Want to reindent, minify or sort keys instead? Use the JSON Formatter.

What the JSON Viewer is for

A pretty-printed API response is readable for twenty lines. At two thousand lines you scroll, lose track of which bracket you are inside and end up searching for a key with Ctrl+F only to land in the wrong array element. The JSON Viewer turns the document into a tree you can fold: open just the branch you care about, see at a glance that an array holds 2,000 items, and click a key to get the exact path you need for code,jq filters or test assertions.

It does not rewrite your JSON. If you need re-indented or minified text to paste somewhere, use the JSON Formatter, which shares the same strict parser and error messages.

How to use it

  1. Paste JSON into JSON to explore, drop a .json file on the upload area, or click Load example.
  2. The tree appears below with the root and its direct children open. Click the ▶ arrow (or the … placeholder) to open or close a branch.
  3. Use Expand all or Collapse all to reset every branch at once.
  4. Type in Search keys and values to highlight matches; the branches that contain them open automatically.
  5. Click any key or array index to select it. Its JSONPath is copied to the clipboard and shown in the bar above the tree, with Copy path and Copy value buttons.
  6. Tick Show value types to label every string, number, boolean and null.

Worked example

Load the built-in example — a paginated users response — and try these steps:

{
  "status": "ok",
  "page": { "number": 1, "size": 2, "total": 57 },
  "users": [ { "id": 101, "name": "Ada Lovelace", … },
             { "id": 102, "name": "Alan Turing", … } ],
  "feature flags": { "beta-search": true, "dark_mode": false }
}
  • The root row reads object · 4 keys and users reads array · 2 items.
  • Search for manchester: one match, and users → 1 → address opens to show it.
  • Click the highlighted "city" key: the path $.users[1].address.city is copied.
  • Click "beta-search": because the key contains a dash and its parent a space, the path is $['feature flags']['beta-search'].
  • Select address under the first user and press Copy value to get { "city": "London", "zip": "NW1 6XE" } as indented JSON.

Reading the tree

  • Labels after objects and arrays give their size (object · 3 keys, array · 12 items); with Show value types on, every leaf gets string, number, boolean or null.
  • Colours: strings green, numbers amber, booleans violet, null red, keys blue, array indexes grey.
  • Numbers are shown exactly as written in the source, so long IDs are not rounded.
  • The status line shows the root type, the total number of values, the maximum depth, how many duplicate keys exist and the number of search matches.
  • Paths start at $ (the root), use .key for simple keys, ['key'] for anything else and [n] for array positions (zero-based).

Limitations

  • Input must be strict JSON (RFC 8259): no comments, trailing commas or single quotes. Errors are reported with line and column.
  • Maximum input is 20 MB. Containers render 200 children at a time, and Expand all is disabled for documents over 20,000 values.
  • Search tracks at most 500 matches and does not match array indexes. Matches inside a container beyond its first 200 children only appear after Show more.
  • When an object has a duplicate key, both entries are shown and share the same path; a JSONPath engine will only find one of them.

Tips

  • A copied path like $.users[1].address.city maps directly to JavaScript (data.users[1].address.city) and to jq (.users[1].address.city).
  • Collapse all, then search: only the branches that matter open, which is the fastest way to find one field in a large response.
  • Need the structure as types rather than a tree? Generate them with JSON to TypeScript.

Frequently Asked Questions

Is my JSON uploaded anywhere?

No. The document is parsed and rendered by JavaScript in your browser tab. Pasted text and dropped files never leave your device.

What is the difference between the JSON Viewer and the JSON Formatter?

The viewer is for reading and navigating: a collapsible tree, search, types, sizes and JSONPaths. The JSON Formatter is for producing text: it re-indents, minifies or sorts keys and gives you a file to copy or download.

How do I get the path to a value?

Click the key (or the array index) next to the value. Its JSONPath, for example $.users[1].address.city, is copied to your clipboard and shown in the bar above the tree, where you can also copy the value itself.

How are keys with spaces or dashes written in the path?

Keys that are not plain identifiers use bracket notation with single quotes, as in $['feature flags']['beta-search']. That is the form accepted by JSONPath (RFC 9535) and by most JSONPath libraries.

Can it open large JSON files?

Files up to 20 MB are accepted. Only the first two levels open automatically, each object or array shows 200 children at a time with a Show more button, and Expand all is disabled above 20,000 values so the page stays responsive.

What does the search match?

It matches, case-insensitively, any object key or any string, number, boolean or null value that contains your text. Matching rows are highlighted and their parent branches open automatically; up to 500 matches are tracked.