 <pre><code>var printStorageBody = function(){ $("body").html(""); $("&lt;pre&gt;&lt;/pre&gt;").appendTo("body"); $("pre").html("\r\n" + JSON.stringify(localStorage).replace(/","/g , "\r\n").replace("{ ", "").replace(" }","") + "\r\n"); }; </code></pre>