Skip to content
🗜️

Code Minifier

Minify HTML, CSS, and JavaScript. Reduce file size to improve loading speed.

Enter code above and click Minify.

Code Minification

Code minification removes unnecessary characters from source code — whitespace, comments, and newlines — without changing its behavior. The result is a smaller file that loads faster over the network. Minification is a standard step in front-end build pipelines for HTML, CSS, and JavaScript.

HTML

HTML minification removes HTML comments (<!-- ... -->) and collapses whitespace between tags. Browsers ignore extra whitespace in HTML, so removing it has no visual effect but reduces file size.

CSS

CSS minification removes comments (/* ... */), collapses whitespace, and removes spaces around {, }, :, ;, and ,. It also removes the last semicolon before } which CSS parsers allow to be omitted.

JavaScript

This tool performs conservative JavaScript minification: it removes single-line comments (// ...), multi-line comments (/* ... */), and collapses whitespace. Note: this is not a full optimizer like Terser — it does not rename variables or remove dead code. Use it for quick size reduction; use Terser or esbuild in production build pipelines.

Privacy

All processing runs 100% in your browser. No data is sent to a server.