ToolsJavaScript Minifier

JavaScript Minifier

Minify supported JavaScript locally and inspect the actual output size.

0 / 250,000 characters

Press Ctrl+Enter (or ⌘+Enter) while this input is focused to minify.

0 characters

How it works and limits

  • Processing happens locally in your browser; pasted source is not uploaded.
  • Ordinary comments are removed. Block comments beginning with /*! are retained.
  • Parsing and code generation use Esprima 4 and Escodegen: supported input is limited to their ECMAScript 2017-era JavaScript grammar. This tool does not transpile or bundle code.
  • JSX, TypeScript, Flow, optional chaining, nullish coalescing, and other syntax unsupported by those packages are not accepted.
  • Input is limited to 250,000 characters to bound synchronous browser work.
  • Ctrl/⌘+Enter is handled only while the input editor is focused.