JavaScript Minifier Online
Minify JavaScript to reduce file size for production. Free, no signup, works in your browser.
Minified output will appear here…All minification happens in your browser. No data is sent to any server.
About JavaScript Minifier
This JavaScript minifier removes comments, whitespace, and newlines from your code to reduce file size for production. It correctly handles single-line (//) and multi-line (/* */) comments, preserves string literals and template literals, and collapses whitespace while maintaining necessary spaces between identifiers. The size savings are displayed in real time. Note: this is a whitespace/comment minifier — for variable renaming and dead code elimination, use a build tool like Terser or esbuild.
Frequently Asked Questions
How much does JavaScript minification save?
Does this minifier rename variables?
Will minification break my code?
Related Tools
JSON Formatter & Beautifier
Format, beautify, and validate JSON data
Diff Checker
Compare two blocks of text and see the differences highlighted
HTML Entity Encoder / Decoder
Encode and decode HTML entities like & < > "
CSS Minifier & Beautifier
Minify CSS to reduce file size or beautify compressed CSS
HTML Beautifier
Format and indent HTML code for readability