Free · No sign-up · Runs in browser

JavaScript Minifier

Strip comments and whitespace from JavaScript. Preserves string, template, and regex literals. Safe for inline <script> blocks when a build tool isn't an option.

JavaScript Input
Minified
// Minified JavaScript will appear here…

JavaScript Minifier

A lightweight JavaScript minifier that strips comments and whitespace while preserving the exact semantics of your code. No identifier mangling, no dead-code elimination — those require an AST-aware tool like Terser or esbuild. Perfect when you need smaller bytes for inline scripts, email templates, bookmarklets, or quick deploys where a build step is overkill.

What's Preserved

  • String, template, and regex literals byte-for-byte
  • Variable and function names (no mangling)
  • Program semantics — the output runs identically

FAQ

Does it work with TypeScript?

Only after compilation. TypeScript annotations are not JavaScript — strip them first with tsc or esbuild.

Is my code uploaded?

No. Minification is 100% client-side.

Related

Pretty-print instead with the JS Formatter.

Literal-safe

Strings, templates, and regex are preserved exactly.

No build step

Paste → minify → copy. No npm install.

Fully private

Code never leaves your browser.