Did you find this tool helpful?
Minify JavaScript, CSS and HTML instantly. See exact file-size savings and download or copy the optimised output.
Minification removes everything from source code that isn't needed for execution — whitespace, indentation, comments, and newlines. For JavaScript it can also rename variables and functions to shorter names (called mangling), which further reduces file size. The result is functionally identical code in a much smaller file.
A typical JavaScript file sees 20–60% size reduction from minification alone, with CSS files often achieving similar savings. When combined with gzip compression on the server, savings can exceed 80%.
This tool uses Terser, the same industry-standard minifier used by Webpack, Vite, and Rollup. It removes comments and whitespace, collapses expressions, and optionally mangles variable names to single characters.
Spaces around selectors, properties, and values are removed. Comments are stripped. Trailing semicolons inside rule blocks are removed. Empty rules are optionally deleted. The result is a single-line CSS file that loads faster.
HTML comments are removed. Whitespace between tags is collapsed. Unnecessary spaces within tags are eliminated. The structure and semantic meaning of the HTML is fully preserved.
a, b, c). It's safe for most code but can cause issues with code that uses eval(), relies on function names, or uses some frameworks that inspect variable names at runtime. Disable it if your minified code causes errors.We read every message ✌️