Developer Tools

Code Minifier / Beautifier

JavaScript Minifier

Shrink JavaScript file size.

JavaScript0 chars
JavaScript minified

Guide & explanation

The JavaScript Minifier shrinks a file with Terser: it removes whitespace and comments, shortens local variable names, and simplifies some expressions. Semantics are preserved.

Example

function add(first, second) {
  // add them
  return first + second;
}

becomes

function add(d,n){return d+n}

Options

  • Mangle names — renames local variables/parameters to short identifiers. Turn it off if the result needs to stay readable.

The status panel shows the size reduction. For real production builds, minification is usually run by your bundler (esbuild, Rollup, webpack).