var o = {hello:'world', greetings: ['one', 'two', 'three']}; undefined // regular, difficult to read for large objects JSON.stringify(o); "{"hello":"world","greetings":["one","two","three"]}" // presto! JSON.stringify(o, '', ' '); "{ "hello": "world", "greetings": [ "one", "two", "three" ] }"