Skip to main content

JavaScript Minifier – Minify JS Online with Terser

Free JavaScript Minifier powered by Terser. Minify JS online: remove comments, compress code and compare file size, all in your browser with no upload.

JavaScript Minifier

Shrink JS file size with Terser — industry-standard compression

Minified JavaScript will appear here

Paste JavaScript above and click Minify

What is JavaScript Minifier?

JavaScript Minifier compresses your code with Terser, the minifier Webpack uses by default. Paste plain JavaScript to remove comments, fold constants and eliminate dead code, then compare the original and minified size and download the result. Top-level names stay unmangled, and JSX must be transformed to plain JavaScript first. Everything runs in your browser, so your source code is never uploaded.

  • javascript
  • minifier
  • terser
  • compress
  • optimize
  • js

Features

What you get with JavaScript Minifier.

  • Powered by Terser

    Uses the same minifier Webpack ships by default, for production-grade JavaScript compression.

  • Compression & Dead-Code Elimination

    Simplifies expressions and strips unreachable code in two optimization passes.

  • Size Comparison

    See original vs. minified byte count and percentage saved after each run.

How to use JavaScript Minifier

Follow these steps to get the best results.

  1. Paste your JavaScript

    Paste plain JavaScript (ES2022+ is fine; transform JSX to JS first).

  2. Click Minify

    Run Terser — comments are removed and code is compressed in two passes.

  3. Compare and copy

    Check the size reduction, then copy or download the minified script.

Advertisement

In-feed adResponsive

Frequently asked questions

Common questions about JavaScript Minifier.

Yes — everything runs in your browser using Terser. Your code is never sent to any server.

Comments

Share feedback, ask questions, or help others use this tool.

Join the discussion

Sign in to comment, reply, and report inappropriate content.

Advertisement

Mobile banner adResponsive