What the JSON Viewer does
The JSON Viewer shows JSON as a collapsible tree. Each object and array shows how many keys or items it contains, and values are coloured by type, which makes it easy to explore large API responses without scrolling through thousands of lines.
Using the JSON Viewer
- Click the name of an object or array to collapse or expand it. The number next to it is its count of keys or items.
JSON Viewer example
An API response with a list
Input
{"total":2,"items":[{"id":1,"tags":["a","b"],"owner":null},{"id":2,"tags":[],"owner":{"name":"Lin"}}],"next":"/items?page=2"}Tree
{3}
total: 2
items [2]
0 {3}
id: 1
tags [2]
0: "a"
1: "b"
owner: null
1 {3}
id: 2
tags [0]
owner {1}
name: "Lin"
next: "/items?page=2"items [2] tells you there are two entries before you open it, and the two objects show {3} keys each. The empty tags array is shown as [0], which is easy to miss in raw text.
Each output was produced by running this tool on the input above it.
How it works
The input is parsed with the browser's JSON parser, then drawn as nested, collapsible sections. Each object shows its number of keys in braces and each array its number of items in brackets. Every key and value is inserted as escaped text, so content such as <script> inside your JSON is displayed, never run.
Details and limits
- Every level is open when the tree is first drawn. For a very large document, collapse the top-level sections you do not need; the browser then has far fewer rows to lay out.
- Strings are shown with their quotes and escapes, as they would appear in JSON, so a value containing a line break shows
\n. - Copy and Download give you the parsed data as JSON indented with two spaces, not the text you pasted.
- Input that is not valid JSON stops the tool, and the status line shows where the problem is. The JSON Validator page lists the usual causes.
Questions
Is my data uploaded when I use JSON Viewer?
No. The tool runs in your browser, so what you paste or open is processed on your own device and is not sent to a server.
What does JSON Viewer do?
The JSON Viewer shows JSON as a collapsible tree. Each object and array shows how many keys or items it contains, and values are coloured by type, which makes it easy to explore large API responses without scrolling through thousands of lines.
How does JSON Viewer work?
The input is parsed with the browser's JSON parser, then drawn as nested, collapsible sections. Each object shows its number of keys in braces and each array its number of items in brackets.
Are there any limits I should know about?
Every level is open when the tree is first drawn. For a very large document, collapse the top-level sections you do not need; the browser then has far fewer rows to lay out. Strings are shown with their quotes and escapes, as they would appear in JSON, so a value containing a line break shows \n.
Is there a size limit?
There is no fixed size limit. Everything happens on your device, so very large inputs depend on its memory and can take longer on a phone than on a computer.
Does it work on phones, and is it free?
Yes. It works in any current browser on Android phones, iPhones, tablets and computers. It is free and needs no account or sign-up.