Back to Tools

JSON API Viewer

Interactive tree viewer for complex JSON API responses.

Input Data

Explore a JSON response as a collapsible tree

Pretty-printed JSON is readable, but a paginated list with nested relationships can still run to hundreds of lines. The JSON API Viewer displays the same data as a tree in which every object and array can be folded away, so you can open only the branch you care about. It is designed for inspecting API responses and configuration files rather than editing them.

Viewing a document

  1. Paste JSON into the Input Data box. You can press Sample to load a small company record with an employees array.
  2. Click Process Now. If the text parses, the summary row confirms it is valid JSON and the tree appears.
  3. Click the small square icon beside any object or array to collapse it. Click again to expand it. The icon switches between a minus and a plus to show the state.
  4. Use Copy or Download for the text of the result, or Clear to remove the input.

What the tree shows

Objects are labeled with the number of keys, for instance Object{3}, and arrays with their length, such as Array[2]. Array entries are numbered from zero. Keys are drawn in pink, strings in green, numbers in blue, booleans in amber and null in red, which makes types easy to tell apart at a glance. Indented guide lines mark the nesting depth.

When it comes in handy

  • Working out where a value sits in a deeply nested response before writing the code that reads it.
  • Checking how many items a list endpoint returned without counting by hand.
  • Verifying that a field is null rather than an empty string.
  • Walking a client or teammate through the structure of a sample payload.

Practical notes

Invalid JSON is rejected with the parser's own message, which usually points to the position of the problem, such as an unexpected token. Duplicate keys are resolved by the standard parser, so only the last value is visible. The viewer starts fully expanded, and very large documents will produce a long page, so collapse top-level branches you do not need. String values are shown as they appear, but the tree is a viewing aid: Copy and Download take the text of the visible tree, not a re-serialized JSON file, so use a formatter if you need clean JSON output. Everything is generated by script in the page, so it works on whatever you paste without any account.

Related Tools


Frequently Asked Questions

How do I collapse or expand a branch?
Click the small square icon to the left of an object or array. A minus icon means the branch is open, and clicking it hides the children and changes the icon to a plus. Click the plus to open it again.
What do Object{n} and Array[n] mean?
They give the size of the container: Object{4} has four keys, and Array[10] holds ten elements. This lets you see the size of a collection at a glance without expanding it.
What kind of errors does it report?
If the text is not valid JSON, the panel shows an error containing the browser's parse message, for example an unexpected token and its position. Fix common problems like trailing commas, single quotes or missing brackets and try again.
Can I use it to produce clean JSON for saving?
Not really. Copy and Download output the visible text of the tree, including labels like Object{2}, rather than a JSON file. For a formatted JSON document, use a JSON formatter tool and keep this viewer for exploring structure.
Are the colors meaningful?
Yes. Keys appear in pink, strings in green, numbers in blue, booleans in amber and null in red. The colors help you spot type mismatches, such as a number stored as a quoted string, without reading every value.
Support Chat
We typically reply within minutes

Hello! 👋 Before we start, please tell us your name.