Skip to content
useToolz online tools

JS минификатор онлайн

Sign in or register to save tools to favorites

JavaScript minification removes extra whitespace, comments, and line breaks.

Reduces script size for faster page loading.

Shows compression statistics — character count before and after minification.

The "Format" button performs the reverse operation — adds indentation for easy reading.

JS Minifier Online — JavaScript Compression and Beautification

The JavaScript minifier removes comments, whitespace, and line breaks from JS code, reducing file size to speed up page loading. A beautify (format) function is also available for readable formatting of minified code.

What Gets Removed in JS Minification

  • Single-line comments// comment
  • Multi-line comments/* ... */ (except license comments /*! ... */)
  • Whitespace and indentation
  • Line breaks — code becomes a single line

JavaScript Beautification

The "Format" button restores readability: adds 4-space indentation, line breaks after semicolons and braces, spaces around operators. Useful for reading third-party minified libraries.

Minification in Workflow

  • Vite — built-in minification via esbuild (default) or Terser
  • Webpack — TerserPlugin
  • Rollup — @rollup/plugin-terser

Manual minification is suitable for small scripts, bookmarklets, and quick optimization without build configuration.

Frequently Asked Questions

Is minification safe?
Basic minification (no mangling) is completely safe. Mangling (variable renaming) may break code using eval() or dynamic property names.

Can TypeScript be minified?
No. First compile TS to JS, then minify the output.

How to debug minified code?
Use source maps — they link minified code to the original. Modern bundlers generate them automatically.

For CSS minification use the CSS minifier, for JSON formatting — JSON formatter.

We use cookies for site operation and analytics. Подробнее

Upscaled image
Download

Log in to continue

or