JavaScript Beautifier

Formats JavaScript files with the chosen indentation level and your choice of braces. Supports 4 indentation levels: 2 spaces, 3 spaces, 4 spaces and tabs. You can also select the braces style: collapsed, expanded or expanded with new line.

*The maximum size limit for file upload is 2 megabytes. All files bigger than 500k will be formatted to a new window for performance reason and to prevent your browser from being unresponsive.

Option 1: Copy-paste your JavaScript string here
Option 2: Or upload your JavaScript file
Indentation level:
Brace style:
Force output to new window: