Pretty print JavaScript with Google Chrome

zx

The built-in Developer Tools from Google Chrome allows formatting of an inline (minified) JavaScript code to a human readable format.

To format the JavaScript code, fire up the Developer Tools, go to the “Scripts” section and select the desired script. Then press the “Pretty print” button (marked with curly brackets) from the bottom of the Developer Tools. The JavaScript code is now presented in a human readable format.

If the “Pretty print” button is enabled it will affect all scripts which are opened in the Developer Tools’ “Script” tab.

3 thoughts on “Pretty print JavaScript with Google Chrome”

Leave a Reply