A lightweight, zero-dependency Python tool to prettify, minify, and validate JSON files directly from your terminal.
While tools like jq are powerful, they often require external installation. This tool is designed to work anywhere Python is available, using only built-in modules.
- Prettify: Transform dense JSON into human-readable, indented text.
- Minify: Compress JSON for use in payloads and configuration files.
- Validate: Catch syntax errors and malformed JSON instantly.
- Piping Support: Works seamlessly with
stdinandstdout.
python3 json_formatter.py data.jsonpython3 json_formatter.py data.json --minifycurl -s https://api.github.com/users/github | python3 json_formatter.py -MIT License.