Минификатор JavaScript

Compress JavaScript code by removing comments, whitespace and unnecessary characters.

Ad Space
Ad Space

About JavaScript Minification

JavaScript minification reduces file size by removing comments, whitespace, and collapsed newlines. This results in faster page loads and improved performance. For production use, consider using build tools like Terser or UglifyJS for more aggressive optimizations including variable renaming. This tool provides basic minification suitable for quick compression. All processing happens in your browser.

How It Works

  1. Paste JavaScript: Enter any JavaScript — ES5, ES6+, browser scripts, or Node.js modules.
  2. Minify: Click to strip comments and whitespace, shorten variable names, and collapse expressions.
  3. Copy the output: The minified script is ready to deploy. A size reduction percentage is shown.

Why Minify JavaScript?

JavaScript is the heaviest resource type for web pages — it blocks rendering and requires parse and compile time in addition to download time. Minification typically reduces file size by 30–60%, directly improving page load speed and Lighthouse scores. Modern minifiers like Terser (used internally) can also perform dead code elimination and constant folding, producing even smaller output than simple whitespace removal. For high-traffic websites the bandwidth savings from minified JS are significant and translate directly to lower infrastructure costs.

Optimisations Applied

Related Tools