Skip to content

JSON Viewer (Tree View)

Paste JSON, upload a file or load a URL and read it as a collapsible tree instead of a wall of text. Expand what matters, copy the path or value of any node, and switch to code view when you need the formatted text. Nothing leaves your browser.

Loading editor...
Paste or type JSON
Nothing to show yet
Output
Auto-run ON

How to view JSON as a tree

  1. Paste JSON into the left panel, drag a .json file onto it, click the upload icon (up to 5 MB), or use Load from URL.
  2. The tree appears on the right as you type. The first two levels are expanded; click the arrow next to any key to open or close it, or click the 12 items badge on a collapsed node.
  3. Click a key or array index to copy its JSONPath, for example $.customer.email. Click a value to copy it, or the copy button on an object or array to copy that branch as JSON.
  4. Switch to Code for the formatted text; the indent dropdown (2, 3, 4 spaces or tab) applies there. Minify collapses the document to one line.
  5. Use Copy or Download on the output toolbar to take the result with you.

If the input is not valid JSON, the error bar shows the line and column. Click Fix to repair common mistakes, then Undo fix if the result is not what you meant. For messier input, such as AI output wrapped in prose, use the JSON fixer.

What the tree gives you

Input:

{
  "orderId": 1042,
  "customer": { "name": "Maya Patel", "vip": true },
  "items": [
    { "sku": "A-100", "qty": 2 },
    { "sku": "B-220", "qty": 1 }
  ]
}

Clicking the keys in the tree copies these paths:

$.orderId
$.customer.name
$.items[0].sku
$.items[1].qty

Keys that are not plain identifiers use bracket notation, such as $["content-type"]. Paste a path into the JSONPath tester to run it against other documents.

Limits and notes

  • Uploads and URL fetches are capped at 5 MB. Pasted text has no fixed limit, but very large documents depend on your browser's memory; see validating large JSON in the browser and our notes on formatters for large responses.
  • Arrays and objects with more than 100 children render 100 at a time. Click Show 100 more to continue. The code view and the download always hold the full document.
  • Everything runs in your tab. No file, URL or pasted text is sent to a server.
  • URL loading is done by your browser, so APIs that do not send CORS headers will fail. Download the response and upload it instead.
  • The viewer displays a document; it does not edit it. Integers above 2^53 are shown as JavaScript rounds them, so keep large IDs as strings in your JSON.
  • New to the format? JSON array vs object explains the two shapes you will see in the tree, and how to open a JSON file covers desktop editors.

Frequently Asked Questions

How is the viewer different from the formatter on the homepage?
Same parser, different starting point. The formatter opens in code view with Format, Validate and Sort buttons. The viewer opens in tree view for reading and navigating a document. You can switch between Code and Tree on either page.
How do I copy the path to a nested value?
Click the key or array index in the tree. Its JSONPath, such as $.items[0].sku, is copied to your clipboard. Click a value to copy the value itself, or the copy button on an object or array to copy that whole branch as JSON.
Why does a large array only show 100 items?
Rendering thousands of nodes at once can freeze the tab, so the tree shows 100 children at a time with a Show more button underneath. The Code view and the Download button always contain the full document.
Can I view a JSON file from a URL?
Yes. Click Load from URL and paste the address. Your browser fetches it directly, so the server must allow cross-origin requests (CORS). If it does not, download the response and upload the file instead.
The JSON will not parse. What now?
The error bar reports the line and column. Click Fix to repair trailing commas, comments, single quotes and code fences; Undo fix restores your original text if the repair guessed wrong.
Is my JSON uploaded anywhere?
No. Parsing and rendering run as JavaScript in your browser tab. You can disconnect from the network after the page loads and the viewer keeps working.

Guides that go with this tool

More JSON tools

JSON Fixer: Repair Invalid JSON

Repair broken JSON in your browser. Strips markdown fences and prose, fixes trailing commas, single quotes, comments, unquoted keys, Python literals and unclosed brackets, and lists every problem it detected.

JSON to CSV Converter

Convert a JSON array of objects to CSV in your browser. Nested objects are flattened to dotted columns, values are quoted correctly, and Excel-friendly output is one click away.

CSV to JSON Converter

Convert CSV with a header row into a JSON array of objects in your browser. Numbers and booleans are detected, leading-zero codes stay strings, and the delimiter is picked up automatically.

JSON to YAML Converter

Convert JSON to clean YAML in your browser with 2, 3 or 4 space indentation. Strings that a YAML parser would read as numbers, booleans or dates are quoted so they survive the round trip.

YAML to JSON Converter

Convert YAML to JSON in your browser. Multi-document files become an array, anchors and aliases are resolved, and only null, true, false and plain numbers are typed, so yes, NO and dates stay strings.

JSON to XML Converter

Convert JSON to XML in your browser. Choose the root and array item element names, nulls become xsi:nil, keys are sanitised into valid XML names, and text is escaped.

XML to JSON Converter

Convert XML to JSON in your browser. Attributes are kept as @_name keys, repeated tags become arrays, numbers and booleans are detected, and invalid XML reports the line and column.

JSON Compare (Diff)

Compare two JSON documents in your browser and get a structural diff that lists every changed, added, and removed value with its JSONPath. Key order and whitespace are ignored.

JSONPath Query Tester

Test JSONPath expressions against your JSON in the browser. Pick an expression, see the matches as a JSON array with a count, and explore the results in tree view.

JSON Escape / Unescape

Escape text into a JSON string literal, unescape one back to plain text, or stringify a whole JSON document to embed it inside another JSON value or in source code.