All Tools

JSON Viewer, Collapsible Tree and Search, Private

Open JSON as a collapsible tree in your browser. Expand or collapse branches, search keys, and copy any value or its path. Big numbers stay exact and long arrays load in pages. Nothing is uploaded.

Removes comments and trailing commas before parsing.

0 characters, 0 bytes


About the JSON Viewer

The JSON Viewer shows JSON as a tree you can open and close, instead of as a wall of text. Paste a document into JSON and the tree appears below it: objects and arrays are branches, and every value sits on its own row with its key, coloured by type, so strings, numbers, booleans and null are easy to tell apart. Each branch shows a short summary such as [2] for an array of two items or {} for an empty object.

Your JSON never leaves your device. The text is parsed in the page, so nothing is uploaded, logged or stored, and it is gone when you close the tab. That makes it practical for API responses and log lines you would rather not paste into a website that keeps them.

How to use it

Steps

  1. Paste or type JSON into JSON.
  2. Press the toggle next to any object or array to open or close it, or use Expand all and Collapse all above the tree.
  3. Type in Search keys to hide every row that does not match. The match count is announced under the field, and matching text is highlighted.
  4. Press Copy path on a row to copy its location, such as $.users[0].name, or Copy value to copy the value itself.

Paths you can paste into code

Every row can give you its path in a plain, readable form. The root is $, object keys follow a dot, and array positions go in square brackets, counting from zero. A key that is not a simple name, such as one with a space or a hyphen, is written with brackets and quotes, for example $["first-name"]. Copying the path saves you from counting brackets by hand when you need to reach a deeply nested value.

Big documents stay responsive

A document of a few kilobytes opens fully expanded. Above 50,000 characters the tree starts collapsed, so you open only the branches you care about. Long arrays are shown 100 items at a time with a Show 100 more button, rather than putting thousands of rows on the page at once. If the input is larger than 2 MB, the tool asks before building the tree, because rendering a very large document can slow the tab; press Show tree anyway to continue.

Exact numbers

JavaScript turns every number into a 64-bit float, which cannot hold integers above 253−1=90071992547409912^{53} - 1 = 9007199254740991 exactly. This viewer keeps each number as written, so an ID like 12345678901234567890 is shown with all its digits and 1.50 stays 1.50.

When the JSON is not valid

Instead of a tree you get an error with the line and column of the first problem and the offending line with a caret. Comments and trailing commas are common in hand-written config files; turn on Repair to skip them. It is off by default so the viewer does not hide mistakes.

Worked example

Paste {"user":{"name":"Ada","tags":["math","code"]},"id":7}. The root shows two keys. Search for name and only user and name stay visible, with the count reading 1 match. Press Copy path on code and you get $.user.tags[1]. To tidy or minify the text itself, use the JSON Formatter, and to inspect a token's payload use the JWT Decoder.

Frequently asked questions

Is my JSON uploaded to view it?

No. The tree is built in your browser and nothing is uploaded, logged or stored. Closing the tab clears the text. Avoid pasting live secrets into any online tool you cannot inspect.

What does the path I copy look like?

It starts with $ for the root, uses dots for object keys and square brackets for array positions counted from zero, such as $.users[0].name. Keys with spaces or hyphens are written as $["first-name"] so the path stays unambiguous.

Why does a big document open collapsed?

Above 50,000 characters the tree starts closed so the page stays responsive and you open only the branches you need. Expand all is still available, and long arrays are shown 100 items at a time with a button for the next batch.

What happens with a very large file?

Above 2 MB the viewer waits and shows a warning instead of building the tree straight away, because rendering that much can slow the tab. Press Show tree anyway to continue. Nothing is sent anywhere either way.

Does searching look at values too?

Search matches keys, not values. Rows that do not match and have no matching descendants are hidden, and the matching part of each key is highlighted. The match count is announced for screen readers.

Are large integers shown correctly?

Yes. Numbers are kept as the text you wrote, so integers above 9007199254740991 keep every digit and 1.50 stays 1.50, instead of being rounded to a floating point value.

Other related tools