JavaScript Beautifier

Format minified or messy JavaScript with consistent indentation.

JavaScript Beautifier

.js · .jsx

Paste text or open a file to see the result.

What it does

Adds line breaks and indentation to JavaScript that is minified or written without care. It helps when you need to read a script from a website, debug it or see what a bundle does. The code works the same; only the layout changes.

About the .js format

.JS file extension
File Type
JavaScript File
Developer
Brendan Eich / Netscape
Category
Web Files
MIME
text/javascript

JavaScript is a scripting language for adding interactivity to webpages. It also makes heavy use of HTML and CSS.

Also works with

JavaScript Beautifier questions

How do I use the JavaScript Beautifier?

Paste the text into the Input box or open a file, set the options, then copy or download the result.

Does renaming a file to .js change its format?

No. The extension only tells programs what to expect, and the content of the file stays the same. To change the format, convert the file. The .js page lists programs and converters for it.