Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I try to perform the cURL request here, Windows 7 (x64) returns an output with no line breaks:


75-isn-10015-abd-al-rahim-al-nashiri-jtf-gtmo","title":"ISN 10015 - Abd al Rahim
 al Nashiri - JTF-GTMO Detainee Assessment","access":"public","pages":15,"descri
ption":null,"source":null,"created_at":"Sun, 24 Apr 2011 15:50:19 +0000","update
d_at":"Mon, 25 Apr 2011 17:11:41 +0000","canonical_url":"http://www.documentclou","resource
tle":"ISN 10020 - Majid Khan - JTF-GTMO Detainee Assessment","access":"public","
pages":12,"description":null,"source":null,"created_at":"Sun, 24 Apr 2011 15:50:
18 +0000","updated_at":"Mon, 25 Apr 2011 17:10:01 +0000","canonical_url":"http:/
sn-10020-majid-khan-jtf-gtmo-detainee-assessment.pdf" ...

This may be the default behaviour, but is there anything I can do to get some readable JSON output when using cURL on Windows?

share|improve this question

Not exactly, but here's a Python script that improves on that.

import urllib2
import simplejson
import pprint

URL = ""

def showfeed(argv):
    argv[1] if len(argv) > 1 else URL
    fo = urllib2.urlopen(URL)
    obj = simplejson.loads(

if __name__ == "__main__":
    import sys
share|improve this answer
I’ll definitely keep this in mind. It is probably possible to rework it to format JSON output from cURL inside the terminal, but that is most likely outside my own current ability. I’ll see what other users may know. But nevertheless, even outside the scope of the question, as someone who focuses his programming on Python, this is very valuable. – Kiwi Apr 25 '11 at 19:08
The terminal won't help you. You need a program to format it. I don't think curl does formatting, either. On a posix platform this would usually be done with tools in a pipeline. – Keith Apr 25 '11 at 19:25

Check out HTTPie, it's like cURL but a lot more human friendly, meaning that it will format json response accordingly and the like:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .