Invalid JSON stops with the parser’s message. The page does not guess a trailing comma into validity.
How to use
- Paste a JSON value: an object, an array, or a single string, number, or literal.
- Press View. Read the paths from the root downward.
- If the parser complains, fix the text. Reset restores the sample object.
Formula / how it works
Paths. The root is named root. An object key is appended with a dot: root.name. An array index is appended in brackets: root.scores[0]. Each line states the type. Strings are shown with JSON quotes so a string of digits is not mistaken for a number. Numbers, true, false and null use their JSON types. An empty object is object{0} and an empty array is array[0].
How this differs from a formatter. The JSON formatter indents the text so a person can read the braces. This viewer throws the braces away and keeps the paths. Use the formatter when you want to edit the file. Use the viewer when you want to confirm that scores is an array of two numbers and that name is a string. The JSON diff checker compares two documents. This page takes one.
Limits that keep the list readable. Nesting deeper than six levels is marked “nested too deep” and not expanded. Objects and arrays show at most twenty keys or items, then a line that says how many were omitted. The whole walk stops after eighty nodes. A twenty-thousand-character cap rejects a payload that would lock the tab. Those limits are why a huge export should be cut down before you paste it. The viewer is for understanding a value, not for paging through a database dump.
Errors. JSON.parse is the parser. A trailing comma, a single-quoted string, or a bare key fails. The message is the engine’s message, prefixed with “JSON parse error”. Comments are not JSON. Undefined is not JSON. If you copied from a JavaScript file rather than a JSON file, those are the usual reasons a viewer refuses the text.
Order. Keys are listed in the order JSON.parse produced, which for ordinary string keys is the order they appeared in the text. The viewer does not sort them. Two objects that differ only by key order will show the same paths in different sequences, which matches the file you pasted.
Nothing is stored. The parse happens in the browser. Close the tab and the value is gone, unless you copied the path list.
Worked examples
An object with a nested array
Inputs: JSON: {"name":"Ada","scores":[10,8]}
Paste {"name":"Ada","scores":[10,8]} and press View. The name path is a string and each score is a number under the array.
Result: root: object{2}
root.name: string "Ada"
root.scores: array[2]
root.scores[0]: number 10
root.scores[1]: number 8
A flat array of numbers
Inputs: JSON: [1, 2, 3]
Replace the text with [1, 2, 3] and press View. The root line names an array of length 3, and the indexes follow.
Result: root: array[3]
root[0]: number 1
root[1]: number 2
root[2]: number 3
Use cases
- Checking the type of a field before you write code that assumes a string.
- Finding the path of a nested number in a small payload.
- Seeing an empty object as object{0} rather than wondering if the paste failed.
- Reading a parser error when a trailing comma sneaked in.
Tips & limitations
- Use the formatter when you need the braces back.
- Quote marks on a string line are there so digits-in-a-string stay strings.
- Cut a huge export down before you paste. The walk stops after eighty nodes.
- Key order follows the file. The viewer does not sort keys.
FAQ
How is this different from pretty-printing?
Pretty-printing changes whitespace. This page lists paths and types and does not try to be the file you save back.
Why did a trailing comma fail?
JSON does not allow it. The parser stops, and the page shows that error instead of dropping the comma quietly.
What does root.scores[0] mean?
The root value is an object, scores is an array on that object, and [0] is the first item. Indexes start at zero.
Are keys sorted?
No. They follow the order in the text you pasted.
Will a deep document be fully listed?
Not past six levels, twenty children, or eighty nodes. The list says when it stopped. Trim the document and view the part you care about.
Is the JSON uploaded?
No. JSON.parse runs in the browser.
Runs entirely in your browser; nothing is uploaded. Check the output before you rely on it in production code, data or security decisions.