json pretty print with python 3 howto pretty print json with the python 3 json module $ echo '{"json": "obj"}' | python -m json.tool { "json": "obj" } see https://docs.python.org/3/library/json.html#json-commandline json pretty-print python