JSON API Viewer
Interactive tree viewer for complex JSON API responses.
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
- Paste JSON into the Input Data box. You can press Sample to load a small company record with an employees array.
- Click Process Now. If the text parses, the summary row confirms it is valid JSON and the tree appears.
- 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.
- 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