Format JSON using the standard library.
Section: Pretty-printing
Pretty-print with Python
bash
bash
python -m json.tool data.jsonExplanation
A portable fallback when `jq` is unavailable.
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 Pretty-printing