All Articles
JSON & APIs·5 min read·October 2, 2026

Formatting JSON in the Terminal: The Essential jq Command Guide

Master the command-line jq utility for beautifying, filtering, querying, and transforming JSON streams on Linux and macOS.

TBy Toolstack Engineering
Recommended Free Tool

Try Toolstack's JSON Validator

Free, instantaneous, and processes 100% locally in your browser.

Open JSON Validator

`jq` is the standard lightweight command-line JSON processor for bash, zsh, and terminal environments.

Basic Beautification

Pipe any minified curl output into `jq` for instant colorized formatting: ```bash curl -s https://api.example.com/data | jq . ```

Selecting Specific Keys

Extract only the user email from a response: ```bash curl -s https://api.example.com/user | jq '.data.email' ```

Filtering Arrays

Filter all active users: ```bash cat users.json | jq '.[] | select(.active == true)' ```

Tags:#CLI#jq#Linux#Terminal

More Guides in JSON & APIs