Minify and compress JavaScript code instantly in your browser. Remove comments, whitespace and shorten variable names. Shows exact bytes saved. No upload required.
JavaScript minification reduces the size of your JS files by removing all unnecessary characters — comments, extra whitespace, newlines — without changing functionality. Smaller JS files load faster, improving your website's performance and Core Web Vitals score.
What gets removed: Single-line comments (//), multi-line comments (/* */), extra spaces, tabs, and newlines. The optional "Shorten variable names" option renames local variables to single characters (a, b, c…) for maximum compression.
Note: This tool performs safe, basic minification. For production use with advanced optimisations (tree shaking, dead code elimination), use tools like Terser or webpack in your build pipeline.
Updated: May 2025 · Works on Chrome, Firefox, Safari, Edge · Mobile friendly