Converter Web ToolsConverter WebTools

JavaScript Minifier

Create a JS Minify in your browser, free and instantly.

Powered by the Terser engine — real, safe JavaScript minification.
Minification runs entirely in your browser using Terser. Your code is never uploaded.

About JavaScript minification

A JavaScript minifier shrinks JS files by removing whitespace and comments and shortening local variable names, without changing what the code does. Smaller scripts download and parse faster. Paste your JavaScript, minify it, and copy the compact output. It runs entirely in your browser using the Terser engine.

How JS Minify works

How to minify JavaScript

  1. Paste your JavaScript in the box above.
  2. Click minify — the code is compressed and variable names are shortened.
  3. Copy the smaller script for production.

What minification does

It removes comments and whitespace, shortens local variable names and applies safe optimisations, while keeping the program behaviour identical. The result is smaller and faster to load.

Tips

Minify a copy and keep your readable source for development. If minification reports an error, fix the syntax in your original code first.

Minification vs compression

Minification and server compression work together for the smallest, fastest scripts. Minifying shrinks the code itself — removing whitespace and comments and shortening local variable names — while gzip or Brotli compresses the bytes as they are sent to the browser. Using both gives a much smaller download than either alone. Keep your readable source under version control and minify only for production builds.

Common uses

  • Shrink JS for faster page loads
  • Improve PageSpeed and Core Web Vitals
  • Reduce script bandwidth
  • Minify before deploying
  • Compress a small library or widget
  • Compare original vs minified size
  • Bundle-free quick minification
  • Optimise inline scripts

Frequently asked questions

How do I minify JavaScript?
Paste your JS and click minify — it is compressed with Terser and you copy the smaller output.
Will it change how my code works?
No — minification preserves behaviour while removing whitespace and shortening local names.
Why did minification fail?
Usually a syntax error in the source — fix it in your readable code and try again.
How much smaller will it be?
Often a large reduction, especially on well-commented or verbose code.
Is my code uploaded?
No — minification runs entirely in your browser.
Should I keep the original?
Yes — develop in the readable version and ship the minified copy.
Does it work on modern JS?
Yes — it handles modern JavaScript syntax.
Is it free?
Yes — completely free with no sign-up.