How can I pretty-print a JSON file from the command line? January 26, 2023 by Tarik Pipe the results from the file into the python json tool 2.6 onwards python -m json.tool < 'file_name'