JavaScript Minifier / Formatter

Scan to open this page

Minify or format JavaScript live, powered by terser — the same industry-standard parser used by major bundlers — so your code's behavior is never changed, and /*! @license @preserve comments always survive.

How it works

  1. Paste your JavaScript
  2. Pick Minify (compress + mangle for production) or Format (re-indent for readability)
  3. The result updates live below (debounced) — no button, with a size-reduction percentage shown in Minify mode. Syntax errors show a clear message instead of crashing.

Frequently asked questions

Could minifying break my code?

No — this tool uses terser, an industry-standard parser also used inside major JavaScript bundlers, so it actually understands your code's syntax rather than guessing with regular expressions. Behavior is preserved.

Are license comments removed?

No — comments starting with /*!, or containing @license or @preserve, are kept through minification by default.

What happens if I paste code with a syntax error?

You'll see a clear error message describing what couldn't be parsed, instead of the tool crashing or silently failing.

#JavascriptMinifier#JavascriptMinifierSafeWontBreakCode#JavascriptMinifierLiveNoButton#JavascriptMinifierPreservesLicenseComment

Related tools

From the blog

Update history

  • 2026-08-30 Added: a cover image — used as the card thumbnail, social share image, and blog title image.
  • 2026-08-29 Launched: live JS minify/format (no button, debounced) via terser, size-reduction percentage, /*! @license @preserve comments preserved, graceful syntax-error messages.