JSON Formatter (Free, no ads, no signups)
hqjson.com
hqjson.com
Just wanted to point this out, because often I don’t want to put my private json data into some rando website.
Anyway, jq now ships with macOS Sequoia.
For older versions of macOS, using JavaScript for Automation is preinstalled and gets the job done with a bit more verbosity:
osascript -l JavaScript -e 'function run(argv) { return JSON.stringify(JSON.parse(argv[0]),null,2) }' '{"key": "value"}'You no longer need to install it with Homebrew. jq ships with macOS Sequoia in /usr/bin.
While I also appreciate tools that don't send data, I don't like the normalization of teaching people to paste (potentially) private data into a browser while blindly trusting that it's not being offloaded to some server somewhere.