A fast, interactive JSON viewer for the terminal. Navigate large JSON documents with vim-style keybindings, collapsible tree nodes, syntax highlighting, search, schema generation, and more.
brew tap aryankumar07/tap
brew install jsawnyay -S jsawn-bingo install github.com/aryankumar07/jsawn@latestDownload the latest binary from GitHub Releases.
cat data.json | jsawn # pipe from stdin
jsawn data.json # open a local file
jsawn https://api.example.com/users # fetch JSON from a URL
jsawn a.json b.json <url> # multiple sources as tabsWhen fetching from URLs, you can customize the request:
# Custom headers
jsawn -H 'Authorization: Bearer <token>' https://api.example.com/users
# POST with JSON body (auto-sets Content-Type: application/json)
jsawn -X POST -d '{"name":"foo"}' https://api.example.com/users
# Multiple headers
jsawn -H 'Authorization: Bearer <token>' -H 'Accept: application/json' https://api.example.com/users| Flag | Description |
|---|---|
-H 'Key: Value' |
Add an HTTP header (repeatable) |
-X METHOD |
HTTP method (default: GET) |
-d '{...}' |
Request body (auto-sets Content-Type: application/json) |
Pass multiple files and URLs as separate arguments or comma-separated to open them as tabs:
jsawn users.json https://api.example.com/posts config.json
jsawn users.json,https://api.example.com/posts,config.jsonEach source gets its own tab with independent navigation and state. Switch between them with Tab / Shift+Tab.
# Explore a local JSON file
jsawn package.json
# Pipe output from any command
curl -s https://jsonplaceholder.typicode.com/todos | jsawn
docker inspect <container> | jsawn
kubectl get pods -o json | jsawn
aws s3api list-buckets | jsawn
# Inspect an API response with auth
jsawn -H 'Authorization: Bearer <token>' https://api.github.com/user
# Compare local config with remote
jsawn config.json https://api.example.com/config
# POST and view the response
jsawn -X POST -d '{"query":"users"}' https://api.example.com/graphql| Key | Action |
|---|---|
j / ↓ |
Move down |
k / ↑ |
Move up |
h / ← |
Collapse node / jump to parent |
l / → |
Expand node / move to first child |
Space |
Toggle collapse/expand |
gg |
Jump to top |
G |
Jump to bottom |
| Key | Action |
|---|---|
e |
Expand all nodes |
E |
Collapse all nodes |
1–9 |
Collapse all nodes at depth >= N |
| Key | Action |
|---|---|
/ |
Start search |
Enter |
Execute search |
n |
Next match |
N |
Previous match |
Esc |
Clear search |
Ctrl+u |
Clear search query |
| Key | Action |
|---|---|
f |
Toggle flat view (leaf nodes with full paths) |
: |
Enter command mode |
Tab / Shift+Tab |
Switch tabs (multi-source) |
| Key | Action |
|---|---|
j / k |
Scroll up/down |
d / u |
Page down/up |
G / g |
Jump to end/start |
y |
Copy to clipboard |
q / Esc |
Close overlay |
q / Esc / Ctrl+c
Enter command mode by pressing :, then type a command:
| Command | Description |
|---|---|
schema go |
Generate a Go struct from the JSON |
schema ts |
Generate a TypeScript interface |
schema zod |
Generate a Zod schema |
Schema results open in a scrollable overlay that can be copied to clipboard with y.
- Keys — cyan
- Strings — green
- Numbers — yellow
- Booleans — magenta
- Null — red
Collapsed objects and arrays show a summary like {... 3 keys} or [... 5 items].
The footer displays the jq-style path to the current node (e.g. .users[0].name), along with the scroll position percentage.
Press f to flatten the tree into a list of all leaf nodes with their full paths — useful for quickly scanning values in deeply nested JSON.
Case-insensitive search with highlighted matches across keys and values. Cycle through matches with n / N.
Scroll with the mouse wheel.