Code and data

JavaScript Minifier

Shrink JavaScript with a real parser, not regex.

  • Free
  • Runs in your browser: nothing is sent
  • No limit: it runs on your device
  • No sign-up

Tryfunction greet(name) { // s…const a = 1; // comment con…

About JavaScript Minifier

Paste JavaScript and get a smaller file that behaves the same. The minifier parses your code properly (it uses Terser), so it can remove dead code, shorten expressions and rename local variables safely, which regex-based minifiers cannot do. Everything runs in your browser; your code is not uploaded.

  • Three levels: whitespace only, full minify, or minify with variable mangling
  • Understands modern syntax: modules, classes, async, optional chaining
  • Runs locally in your browser, so private code stays private
Questions · 2

Will minified code still work?

Yes. Minifying removes whitespace and comments and rewrites expressions into shorter equivalents. Mangling renames local variables only, never globals or property names, so the behaviour stays the same.

Is my code uploaded?

No. The minifier is loaded into your browser and runs there.

Use it from code · API

JavaScript Minifier runs in your browser, so there is no server call for it. API docs covers the tools you can call from code.