Include the plugin <script src="jquery.inspect.js"></script> Call the inspect method $.inspect('This is a string'); // Uses the alert as output by default $.inspect([1,2,3,4], 'console'); // The console log can also be utilized $.inspect(document, 'window'); // A new window can be used for larger objects