json.cihat.dev

JSON viewer

This online JSON viewer shows your JSON as a tree you open level by level. Search every key and value, and copy the exact path to any field. It runs in your browser, so nothing is uploaded.

How to use it

  1. Paste JSON or open a .json file. A sample is already loaded so you can try it first.
  2. Click a row to select it; click + to open it. Arrow keys move through the tree, Enter opens and closes.
  3. Type in Search to list every key and value that contains your text, then pick a match to jump to it.
  4. Copy the path as JSONPath ($.books[0].title) or as JavaScript (data.books[0].title), or copy the value itself.

How to read the tree

Each row is one value. An object row shows how many keys it holds and an array row how many items, so you know what a branch holds before you open it. Strings, numbers, booleans and null each have their own colour, and the selected row tells you its type. Above the tree, the readings count the objects, arrays, keys and values in the whole document, its deepest nesting level and its size.

Keys appear in the order they are written in your file. RFC 8259 defines an object as an unordered collection, so order carries no meaning for a program, but keeping it makes the tree match the text you are reading. Array items are numbered from 0, as in every JSON path notation.

Keyboard

Click a row once, then the whole tree works from the keyboard:

KeyWhat it does
↓ and ↑Next and previous visible row
→Open a closed row; on an open row, move to its first child
←Close an open row; on a closed one, move to its parent
Enter or SpaceOpen or close the selected row

Paths you can paste into code

Each selected value shows two paths. JSONPath starts with $, the root identifier standardized in RFC 9535 (February 2024); API test suites, many databases and log tools take it as is. The JavaScript path starts with data and can be pasted after the variable that holds your parsed response. Keys with spaces or symbols are written in brackets, such as $["first name"].

The same field in the sample, the title of the first book, in the notations you are most likely to need:

NotationPathWhere it is used
JSONPath (RFC 9535)$.books[0].titleCopied by this viewer; queries in many tools
JavaScriptdata.books[0].titleCopied by this viewer; your own code
jq.books[0].titleThe jq command line
JSON Pointer (RFC 6901)/books/0/titleJSON Patch and JSON Schema references

Search

Search looks in keys and in values at the same time and ignores case, so sea finds both "The Sea Around Us" and "The Old Man and the Sea" in the sample. Numbers are searched as written, so 1951 finds the year. The list shows each match with its path; picking one opens every level above it and scrolls it into view.

Built for big responses

The tree only draws what you open, and long arrays open 200 items at a time, so a file with hundreds of thousands of values still scrolls smoothly. Files above 200 KB are parsed in a background thread. Search lists up to 300 matches and tells you how many there are in all. Expand all stops after about 2,000 rows, because a fully opened large file would draw more rows than a browser can scroll.

Numbers are shown with the digits you wrote. A 19-digit ID is not rounded the way JSON.parse rounds it. For the shape of the data rather than its rows, the JSON graph viewer draws objects as linked cards. To fix invalid JSON first, use the JSON formatter. To generate types from it, use JSON to TypeScript.

Questions people ask

Is the JSON uploaded anywhere?

No. It is parsed and displayed in your browser; nothing is sent to a server.

How do I open a JSON file?

Press Open file or drop the file on the input box. A .json or .txt file works, and so does any text file holding JSON that you drop on the box.

What is the largest file it opens?

Up to 64 MB. The practical limit is your device’s memory: a 64 MB file can need several hundred MB of browser memory once parsed.

What happens if my JSON is invalid?

The viewer shows the line, the column and what is wrong. The JSON formatter on this site can repair common mistakes such as trailing commas and single quotes.

What is the difference between a JSON viewer and a JSON formatter?

A formatter rewrites the text with indentation, which you then read top to bottom. A viewer shows the data as a tree you can open, search and copy paths from, which is faster for large or deeply nested files.

Does it change the order of keys?

No. Keys are shown in the order they appear in your file.

Can I edit values in the viewer?

No. The viewer only reads. To change the data, edit the text in the input box; the tree updates as you type.