Linux Command Cheat Sheet/Pretty-print JSON

Format JSON output for readability.

Section: sed awk and Structured Text Workflows

Pretty-print JSON

bash
bash
jq '.' response.json
Explanation

A must-have when APIs or tools emit raw JSON.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing sed awk and Structured Text Workflows
Pretty-print columns
Format delimited text into aligned columns.
OpenIn sheetbash1 tag match
Detect file type
Identify file contents and encoding.
OpenIn sheetbash1 tag match
Print working directory
Show the current absolute path.
Create file or update timestamp
Create an empty file if it does not exist.
Print file contents
Concatenate and print files to standard output.
Search text with grep
Print lines matching a pattern.