Developer Tools

JS Minifier

Compress JavaScript code for production use without a build tool. This free JS minifier removes whitespace and comments to trim file size and reduce the time browsers spend downloading and parsing scripts. Note: This is a basic minifier suitable for quick optimization. For production use, consider dedicated build tools like Terser or UglifyJS.

JS Minifier

Free & no signup required

Results

How to Use This Tool
  1. Paste your JavaScript code into the input box
  2. Click "Minify JS" to compress it
  3. Copy the minified output and deploy it to your site
What is JS Minifier?
JavaScript minification removes all characters not required for the code to execute: whitespace, line breaks, comments, and sometimes shortens local variable names. A minified JS file can be 30–70% smaller than its original, reducing download time and improving the "Eliminate render-blocking resources" and "Reduce unused JavaScript" recommendations in Lighthouse audits. Minification is distinct from obfuscation (which scrambles logic for security) and bundling (which merges multiple files). This tool focuses purely on size reduction while preserving all runtime behavior.
Related Tools