JSON Tree Viewer
Explore JSON as a collapsible tree: types, sizes, search, and copyable paths in JavaScript, jq or JSONPath form.
Runs in your browser Your input never leaves your device.
Click a row's path button to copy its path. Arrow keys move, → and ← open and close, Enter copies the path.
Report a problem with this tool
About this tool
Paste JSON on the left, or open a file, and the right side shows it as a tree. Open and close objects and arrays with the arrows or with the keyboard, see the type of each value by its colour (strings green, numbers blue, booleans purple, null grey) and the number of items in each object and array. Long lists are shown 100 rows at a time with a button to show more, so even a big file stays quick. Search finds keys and values (without regard to capital letters), opens the branches that lead to each match, highlights it and lets you step through the matches with the arrows or Enter. Every row has a copy path button that puts the path of that value on the clipboard in the style you choose: JavaScript (data.user.tags[0]), jq (.user.tags[0]) or JSONPath ($.user.tags[0]); keys with spaces or odd characters are written correctly in each style. We checked the paths by evaluating them: for random documents with awkward keys (spaces, quotes, dots, accents, Japanese, __proto__ and others) every path of every value was run with JavaScript, with this site's JSONPath engine and with the real jq, and each returned exactly that value. A mistake in your JSON is reported with the line and column. The tree is built from the text with the browser's own JSON parser, so numbers beyond the range of JavaScript lose precision, as in any browser. Your JSON stays in your browser and is never uploaded.
How to use it
- Paste your JSON or open a file.
- Open the branches you are interested in, or search.
- Choose the path style and press copy path on a row.
- Use the paths in your code, in jq or in a JSONPath tester.
Common problems
- It says the JSON is not valid
- The message names the line and column of the first problem. Common causes are a trailing comma, single quotes or a missing quote.
- A big number looks different
- JSON numbers are read as JavaScript numbers, which are exact up to 9,007,199,254,740,991. Larger whole numbers are rounded.
- The tree is very long
- Close everything with Collapse all and search for the key you need, or open the branches one by one.