Minify JavaScript code online for free. Remove whitespace, comments, and shorten variable names to optimize your scripts for production. No signup required.
First time here? Paste your JavaScript code Your input is processed locally and disappears when you close the tab.
Smaller scripts mean faster pages, and every kilobyte of JavaScript the browser parses delays interactivity. Our free JavaScript Minifier is a powerful javascript minifier online that removes whitespace, comments, and dead formatting while optionally shortening local variable names, producing production-ready code that behaves identically to your source.
Under the hood it uses Terser, the same industry-standard parser that bundlers like webpack and Rollup rely on, so you can compress javascript with confidence that strings, regular expressions, template literals, and modern ES6+ syntax stay correct. Toggle mangle names to squeeze out extra bytes, then watch the before-and-after size and percentage saved update instantly, a genuine way to reduce js file size for libraries, snippets, and inline scripts. As a dependable js optimizer you can minify js free with no upload limits, and copy or download the result as a .js file ready to drop into your build or CDN.
Because Terser runs entirely in your browser, your proprietary logic and unreleased features never leave your machine or hit a server. Use it alongside our HTML Minifier and CSS Minifier to optimize the full front end, format API data with the JSON Formatter, or debug and refine patterns using the Regex Tester.
Paste your JavaScript code
Choose minification level
Click Minify to process
Copy the optimized output