JSON Viewer
Explore large JSON documents as a collapsible tree.
Formatting helps with a small JSON document. It does not help with a 4,000-line API response, where indentation just means a very long file. A tree view lets you collapse what you do not care about and drill into what you do.
Exploring a JSON document
- Paste your JSON into the viewer.
- Collapse the top-level nodes to see the overall shape first.
- Expand only the branch you are interested in.
- Note the path to the value you need, such as
data.items[3].id. - Copy the value or the sub-object directly.
Understand the shape before the values
When you are working with an unfamiliar API, the first question is structural, not factual. Is the response an object with a data wrapper or a bare array? Is pagination at the top level or nested inside a meta key? Are the items uniform?
A collapsed tree answers all of that in a few seconds, which a wall of indented text does not. Get the shape right first and writing the code that consumes it becomes straightforward.
Where a viewer beats a formatter
- API responses with hundreds of records, where you only need to see one.
- Deeply nested configuration files, where the hierarchy is the point.
- GeoJSON and other data formats with enormous coordinate arrays.
- Comparing the structure of two responses from the same endpoint.
- Finding the exact path to a value so you can reference it in code.
Reading arrays of objects
A long array of similar records is the most common structure in API responses. Expand the first element to learn the shape, then collapse it again — every other element will follow the same pattern. When one does not, that inconsistency is usually the bug you were looking for.
JSON viewer questions
What is the difference between a JSON viewer and a formatter?
A formatter re-indents the text and hands it back. A viewer turns the document into an interactive tree you can expand and collapse, which is far more practical once a file exceeds a few hundred lines.
How large a file can it handle?
Files of several megabytes are usually fine, limited mainly by browser memory. For very large datasets, a command-line tool such as jq will be faster and more comfortable.
Can I search inside the JSON?
Your browser’s find function works on the expanded content. Expand the relevant branch first, since collapsed nodes are not rendered and will not be matched.
Why does my JSON fail to load?
Almost always a syntax error. Run it through a validator first — a trailing comma or a single quote is the usual culprit.
Is my data uploaded?
Yes. Your JSON is sent to the server for processing, but it is not stored. See our privacy policy.