python3 -m json.tool file.json

Category: Python & pip

python3 -m json.tool file.json

Pretty-print and validate a JSON file

Reads a JSON file, validates it, and prints it with proper indentation — useful for inspecting minified JSON.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.