JSON Viewer

Explore JSON as a collapsible tree, search it and copy any path

Paste or open a JSON file to explore it as an interactive tree: expand and collapse objects and arrays, search keys and values, and click any line to copy its JSONPath (like $.items[0].price) or its value. Errors are shown with the exact line and column.
Try an example:

About JSON Viewer

How it works

  1. Your JSON is parsed in the browser as you type. If it is invalid, you get the line, column and a likely cause instead of a tree.
  2. The tree shows each object and array with its number of keys or items; the first two levels open automatically. Strings, numbers, booleans and null each get their own colour.
  3. Search looks through keys and values, opens every branch that contains a match and highlights it.
  4. Clicking a line selects it and shows its JSONPath - the address you would use in code or tools like jq - with buttons to copy the path or the value.

What you need

  • JSON text, or a .json file opened from your device.

Tips

  • Use Collapse all, then open only the branch you care about, to find your way around large API responses.
  • Copy a path straight into code: $.items[0].price becomes data.items[0].price in JavaScript.
  • For a formatted copy of the JSON text, use the JSON Beautifier.

Limitations

  • Very large files (tens of MB) may be slow to open in the tree.
  • Editing happens in the text box; the tree is read-only.

Runs in your browser. Everything happens in your browser - your code and data are never uploaded.

Frequently asked questions

How do I view a JSON file?+

Click "Open file" and choose the .json file, or paste its contents. It appears as a tree you can expand, collapse and search. The file is read by your browser and never uploaded.

What is a JSONPath?+

A way to write the location of a value inside JSON, starting with $ for the root: $.customer.email or $.items[1].sku. Many tools and libraries accept it, and it maps directly to code like data.items[1].sku.

Why does my JSON show an error?+

The most common causes are trailing commas, single quotes, unquoted keys and comments - none of which JSON allows. The message shows the line and column of the problem.