Making JSON more readable in the Terminal with Curl extension jq

jq banner


When developing apps and games you may need to read JSON files quickly in the Terminal, this can be a pain.

JSON is a right pain to read in the Mac terminal but Cloudant have some great tips for viewing JSON here.

First of all here is a random JSON file displayed in the mac terminal using curl.

Terminal Command:

curl ''

json default

What a mess.


Install the ./jq lightweight command line JSON processor from

Install (type this in the terminal and install)

ruby -e "$(curl -fsSL"
brew install jq

fyi: Homebrew is a packaged installer (read more and check out to see what other packages you can install.


Now lets try the curl command again with ” ! jq .” added to the end of the curl request.

Terminal Command:

curl '' | jq .

color coded json in terminal

If you just want a web based tool try the Postman extension for Google Chrome.