HTML / CSS / JS Minifier

Strip whitespace and comments from HTML, CSS or JavaScript.

Paste HTML, CSS or JavaScript and get a minified version with comments and unnecessary whitespace removed. Useful for inline-script blocks, email templates and quick size checks. Heavy production builds should still use a dedicated build tool.

Common use cases

  • Minify inline-script and inline-style blocks in static HTML pages
  • Strip whitespace from HTML email templates to fit Gmail's 102 KB limit
  • Quickly test how much smaller a piece of CSS or JS becomes when minified
  • Reduce payload size for analytics tags, snippets and code embeds

Frequently asked questions

Will minified JS still run?
Yes — we only remove whitespace and comments. Variable renaming (true minification) requires AST-aware tools like Terser or esbuild.
Will it break my JavaScript?
It is conservative — preserves string literals, regex literals and template literals exactly. Code that depends on whitespace (e.g., raw HTML inside a template literal) is preserved unchanged.

Related tools