JavaScript Minifier
Shrink JavaScript by removing comments, whitespace and line breaks.
What it does
Strips comments, whitespace and line breaks from JavaScript. Do this before you put a script on a website, so it downloads faster. The result runs the same as your source, so keep the original for editing.
About the .js format
.JS file extension.js JavaScript File
Web Files
- 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.
Related tools
More in Code Formatters
JavaScript Beautifier
Format minified or messy JavaScript with consistent indentation.
XML Formatter
Indent XML, SVG and RSS and check that they are well formed.
HTML Beautifier
Indent HTML so the nesting of tags is easy to follow.
SQL Formatter
Break long SQL queries into lines and capitalise the keywords.
CSS Beautifier
Put each CSS rule and property on its own line with even indentation.
CSS Minifier
Remove comments and whitespace from CSS to make the file smaller.
HTML Minifier
Remove comments and extra whitespace from HTML.
YAML Formatter
Re-indent YAML and make quotes and lists consistent.
JavaScript Minifier questions
How do I use the JavaScript Minifier?
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.