JavaScript Minifier

Safely compress JavaScript by stripping comments and whitespace.

100% client-side Instant results Free forever Nothing uploaded

About the JavaScript Minifier

A conservative JavaScript minifier that removes comments and collapses whitespace while preserving strings, regexes and template literals — safe rather than aggressive, with before/after size stats.

For quick wins on small scripts without setting up a build pipeline.

How to use the JavaScript Minifier

  1. Paste your JavaScript.
  2. Click "Minify".
  3. Copy the smaller output; verify it runs as expected.

Common uses

Shrinking small scripts without build tools Compacting inline scripts Quick size estimates

Frequently asked questions

Is this as aggressive as Terser?
No — it deliberately avoids renaming variables or rewriting logic, trading a few percent of size for guaranteed safety.
Are strings and regexes safe?
Yes — the minifier tracks string, template and regex contexts and never alters their contents.

Related tools