jsonview

JSON Viewer

A single-file, zero-dependency JSON viewer that runs in the browser. It renders any JSON file as an interactive tree with a side-by-side schema inference panel.

The live version can be seen in https://yk5.github.io/jsonview/viewer.html.

The GitHub project is yk5/jsonview
GitHub page is https://yk5.github.io/jsonview/

Features

Usage

Online

The live version is at https://yk5.github.io/jsonview/viewer.html.

Local development

npm install
npm run build       # produces src/viewer.html
npm run dev         # rebuild on every save (watch mode)
npm run typecheck   # TypeScript type checking
npm test            # run unit tests

Open src/viewer.html in a browser after building.

Using the viewer

  1. Click Load to open a .json file, or click Edit to paste JSON manually.
  2. Browse the Schema panel to see the inferred structure of the data.
  3. Browse the Data panel to explore actual values.
  4. Use Fold All / Expand All to control tree visibility.
  5. Type a level range (e.g. 0-2,4) in the levels input and press Enter or click levels to filter by depth.

Type colors

Type Color
string blue
number purple
boolean red
null gray
object green
array orange