How to Explore Large JSON Files With a Tree View and JSON Paths

Navigate big or deeply nested JSON from APIs and exports, find the value you need, and copy its JSON path for code, queries and bug reports.

Updated September 29, 2026 5 min read

Use the free JSON ViewerExplore JSON as a collapsible, searchable tree with copyable paths

An API returns 3,000 lines of JSON and you need one field: the shipping status of the second item in the third order. A configuration export nests objects eight levels deep. A colleague asks, "Where exactly is the currency code in this response?" Scrolling through formatted text works for small payloads, but it quickly becomes guesswork once arrays and nested objects pile up.

This guide explains how JSON is structured, how a tree view helps you understand it, how JSON paths describe the location of any value, and practical techniques for finding what you need in large documents. It also covers command-line and editor alternatives.

The shape of JSON

JSON has only six kinds of value:

Type Example In a tree
Object {"id": 7} Expandable node with named keys
Array [1, 2, 3] Expandable node with numbered items
String "North" Leaf
Number 42.5 Leaf
Boolean true Leaf
Null null Leaf

Objects and arrays are containers; everything else is a leaf. Any JSON document, however large, is a tree of containers with leaves at the ends. Once you see it that way, a big file becomes a question of which branches to open.

JSON paths: an address for every value

A JSON path describes how to walk from the root to a value. The common notation starts with $ for the root, uses a dot for object keys and square brackets for array positions. Given this response:

{
  "orders": [
    {
      "id": "A-1001",
      "items": [
        { "sku": "DESK-01", "qty": 1 },
        { "sku": "CHAIR-02", "qty": 4 }
      ],
      "shipping address": { "city": "Leeds" }
    }
  ]
}

the paths look like this:

  • $.orders[0].id is "A-1001".
  • $.orders[0].items[1].qty is 4.
  • $.orders[0]["shipping address"].city is "Leeds".

The last one uses bracket notation because the key contains a space. Keys with spaces, hyphens or leading digits cannot use dot notation. Array indexes start at 0, so the second item is [1], a frequent source of off-by-one mistakes.

The same path translates almost directly into code. In JavaScript, data.orders[0].items[1].qty reads the value; in Python, data["orders"][0]["items"][1]["qty"].

Explore JSON with the JSON Viewer

Our JSON Viewer turns JSON into a collapsible tree with colour-coded types and click-to-copy paths.

  1. Open the JSON Viewer. A sample document is loaded so you can try it out.
  2. Paste your JSON into JSON input, or click Open .json file (files up to 20 MB).
  3. If the JSON is invalid, an error box shows the parser message with the line and column. Fix the problem and the tree appears.
  4. Explore the tree. Each object or array shows a count such as "3 keys" or "12 items"; click the arrow or the count to open or close it. Use Expand all and Collapse all to reset the view.
  5. Type in Filter keys and values to show only the branches that contain a matching key or value, with their parents kept visible for context.
  6. Click any key or array index to copy its path, for example $.products[0].name, ready to paste into code or a ticket.
  7. Check the stat tiles for the Root type, the number of Object keys and the Max depth, which tells you how deeply nested the data is.

Very long arrays show the first 500 entries of a node with a note about how many more exist, which keeps the page responsive.

Strategies for large JSON

Collapse first, then drill down

Start with Collapse all and open the root. The top-level keys usually tell you the structure: data, meta, errors, pagination. Open one level at a time instead of scrolling through everything.

Use the counts

An array showing "1 item" when you expected many, or an object with far more keys than the others, often reveals the problem immediately: missing data, a changed API version or duplicated records.

Filter by a value you already know

If you know an order number or email address, filter by it. The tree shrinks to the branch that contains it, and the path shows exactly where it lives.

Compare sibling items

Open two items of the same array next to each other. A field that is a number in one item and a string in another, or missing entirely, is a classic cause of parsing bugs.

Other ways to explore JSON

Browser JSON viewers

Firefox shows JSON responses as a collapsible tree automatically, with a filter and raw view. Chromium-based browsers offer a simpler pretty-print option, and many extensions add a full tree view. This is ideal when the JSON comes straight from a URL you can open.

jq on the command line

jq is a powerful tool for filtering JSON in scripts:

jq '.orders[0].items[] | {sku, qty}' response.json

It is the right choice for automation and repeated queries, and it handles files too large for a browser. Its syntax takes some learning.

Code editors

VS Code and other editors can fold JSON by level and show a breadcrumb of the current path. They are good for files you are editing rather than just reading.

Dedicated query tools

When you need to test path expressions with wildcards and filters, such as every item with a quantity above 2, use the JSONPath Tester.

Tips and troubleshooting

"Unexpected token" errors

Common culprits are trailing commas, single quotes around strings, comments, and unquoted keys. None of these are valid JSON. The JSON Formatter highlights and helps fix them, and our guide on formatting JSON and fixing syntax errors covers each case.

Large numbers change

JSON parsers in JavaScript store numbers as 64-bit floating point. Integers larger than 2^53 (about 9 quadrillion), such as some database IDs, lose precision when parsed. APIs usually send such IDs as strings for this reason.

You need the data in a spreadsheet

A tree is for reading. To analyse rows and columns, convert arrays of objects with JSON to CSV.

Frequently asked questions

What does the $ at the start of a JSON path mean?

It stands for the root of the document. Everything after it describes the steps from the root to the value.

Why do array paths start at [0]?

JSON arrays, like arrays in most programming languages, are zero-indexed. The first item is [0] and the tenth is [9].

Can the viewer open very large JSON files?

It accepts files up to 20 MB. Performance depends on your device, and very large arrays show the first 500 entries per node to stay responsive.

How is a tree view different from a JSON formatter?

A formatter indents the text so it is readable. A tree view lets you open and close branches, filter and copy paths, which is faster for navigating large or deep structures.

Is my JSON sent to a server?

No. Parsing and rendering happen in your browser, so sensitive API responses stay on your device.

Try it now: JSON Viewer

Loading tool…