pretty print a json in developer tools code example Example: pretty print json in console new JSONObject(json).toString(2)