Skip to content

JSON Viewer

Values in the document —
Root type
—
Deepest nesting level
—
Object keys
—
Objects
—
Arrays
—
Strings
—
Numbers
—
Booleans
—
Nulls
—

Paste a JSON document and the viewer lists every value with its path, such as $.tags[1], its type and its value. It also counts objects, arrays, keys and scalars and reports the deepest nesting level. For example, [1, 2, 3] holds 4 values: one array and three numbers at level 1.

About this tool

API responses and config files often arrive as one long line, and finding where a field sits means counting braces by eye. This viewer parses the text with the strict JSON grammar and flattens it into a table: each row gives a path you can reuse in code or in a JSONPath query, the value's type and a preview of the value. Above the table you get the root type, the deepest nesting level and a count of each kind of value, which helps when checking that a payload has the shape a schema expects. Invalid input is reported with the parser's message instead of a partial tree. The table shows up to 300 rows; larger documents are still counted in full. Parsing happens in your browser, so private payloads stay on your device.

How to use it

  1. Add the JSON

    Paste it into the box or open a .json or .txt file from your device.

  2. Check the summary

    Read the root type, total values, nesting depth and the count of each value type.

  3. Find a field

    Scan the Path column of the table for the key you need and copy its path into your code.

  4. Fix syntax errors

    If the input is invalid, the message under the box names the problem, such as an unexpected token.

Examples

A flat array

JSON
[1, 2, 3]

Result Values in the document: 4
Root type: array
Deepest nesting level: 1
Object keys: 0
Objects: 0
Arrays: 1
Strings: 0
Numbers: 3
Booleans: 0
Nulls: 0

  1. Parsed 9 characters as JSON; the root is an array.
  2. Walked every value depth-first: 4 values, 0 object keys, deepest nesting level 1.

The array itself counts as one value and each of its three numbers as another, so the table has four rows.

A user record with a tag list

JSON
{"name": "Ada", "active": true, "tags": ["math", "code"], "manager": null}

Result Values in the document: 7
Root type: object
Deepest nesting level: 2
Object keys: 4
Objects: 1
Arrays: 1
Strings: 3
Numbers: 0
Booleans: 1
Nulls: 1

  1. Parsed 74 characters as JSON; the root is an object.
  2. Walked every value depth-first: 7 values, 4 object keys, deepest nesting level 2.

Four keys at level 1, and the two tags sit one level deeper inside the array, giving seven values in all.

How it is calculated

values = objects + arrays + strings + numbers + booleans + nulls

path
the route from the root $ to a value, using .key for plain names, ["key"] for others and [n] for array positions
level
how many containers enclose the value; the root is level 0

The text is parsed by the browser's standard JSON parser, which follows RFC 8259: double-quoted strings only, no comments, no trailing commas. The result is walked depth-first in document order. Every object, array and scalar counts as one value, and each object member adds one key. Long strings are shortened to 120 characters in the Value column only.

When not to use it

  • JSON5, JSONC or files with comments will be rejected, since only strict JSON is accepted.
  • Multi-megabyte logs in JSON Lines format need a line-by-line tool, because each line is a separate document.

Common mistakes

  • Pasting a JavaScript object literal with single quotes or unquoted keys, which is not valid JSON.
  • Reading a duplicate key as two entries: the parser keeps only the last value for that key.

Frequently asked questions

What does a path like $.tags[1] mean?

The dollar sign is the root of the document. A dot followed by a name steps into an object member, and a number in brackets picks an array item counted from zero, so $.tags[1] is the second item of the tags array.

Why does my JSON fail with an unexpected token?

The usual causes are a trailing comma after the last item, single quotes around strings, unquoted keys, comments, or values like undefined and NaN. None of these are allowed by the JSON standard, even though JavaScript accepts some of them.

Are very large numbers shown exactly?

Numbers are read as 64-bit floating point, the way browsers parse JSON. Integers beyond 9,007,199,254,740,991, such as some database IDs, can lose their last digits; store such IDs as strings if precision matters.

How is nesting depth counted?

The root value is level 0. Every object or array you step into adds one level, so a string inside an array inside the root object sits at level 2.

Is my JSON uploaded anywhere?

No. Parsing and the table are produced in your browser, and opening a file reads it locally without sending it to a server.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, October 28). JSON Viewer. Tools Directory. Retrieved October 28, 2026, from https://tools.milunir.com/developer-tools/json-tools/json-viewer/

MLA

Tools Directory Editorial Team. “JSON Viewer.” Tools Directory, 28 Oct. 2026, https://tools.milunir.com/developer-tools/json-tools/json-viewer/. Accessed 28 Oct. 2026.

Chicago

Tools Directory Editorial Team. “JSON Viewer.” Tools Directory. Last modified October 28, 2026. Accessed October 28, 2026. https://tools.milunir.com/developer-tools/json-tools/json-viewer/.

Link<a href="https://tools.milunir.com/developer-tools/json-tools/json-viewer/">JSON Viewer – Tools Directory</a>