In order to pretty print the cURL output which is in JSON format you can make use of the Python json module.
Example:
% curl -s https://randomuser.me/api/ | python3 -m json.tool
{
"results": [
{
"gender": "male",
"name": {
"title": "Mr",
"first": "Akhil",
"last": "Rai"
},
"location": {
"street": {
"number": 7324,
"name": "Coaker's Walk"
},
"city": "Thrissur",
"state": "Rajasthan",
"country": "India",
"postcode": 41746,
"coordinates": {
"latitude": "8.2937",
"longitude": "-5.5920"
},
"timezone": {
"offset": "-6:00",
"description": "Central Time (US & Canada), Mexico City"
}
} ...

This does format the JSON output but does not add color coding, for this, you can download packages from Brew such as jsonpp or jq
Example:
% brew install jq

Have Questions? Post them here!
- Get cURL command from Chrome Inspect Network HTTP URL
- Downloading Google Chrome using cURL Command
- Get the Size of HTTP Response using cURL Command (Content Length)
- How to set Connection and Max Timeout for cURL Request with Examples
- Hide cURL Outputs and Errors on Terminal
- cURL Example using IP (IPv4 and IPv6) address and Port
- Perform Basic Authentication using cURL with Examples
- Efficient way to perform HTTP cURL GET/POST Requests with Payload
- trurl: A new command-line tool for URL parsing and manipulation by cURL Developer
- Trace using cURL Command Example
- Fetch only content-type using cURL Command
- cURL Option to show HTTP Response Status Code
- [fix] command not found curl
- How to get cURL Command to run in verbose mode?
- Save cURL Command Output to a external file
- List of 28 Protocols supported by cURL with Examples
- URL Encode cURL HTTP GET\POST Data with Examples
- How to Pretty Print cURL JSON Output in Terminal
- eclipse maven m2e : Cannot complete the install - Eclipse
- How to remove or unstage a file from git staged area - Git
- SharePoint excel error - A problem occurred while connecting to the server. If the problem continues, contact your administrator. - SharePoint
- Android : How to make TextView Scrollable - Android
- Java Decompiler Eclipse Plugin - Eclipse
- Spotlight Search file path location on Mac OS X Mavericks or Yosemite - Mac-OS-X
- How to display directory tree in Mac Terminal - MacOS
- Release Date and iPhone Devices that will Support iOS 16 - iOS