HTML, CSS & JavaScript Minifier

Minify HTML, CSS or JavaScript source code directly in your browser.

How to use this tool

Choose a code type and paste source to remove safe whitespace and comments. Review JavaScript output before production use.

Related tool: HTML Formatter →

When to use the HTML, CSS & JavaScript Minifier

Use it to shrink a CSS, JavaScript or HTML snippet before inlining it or shipping a small static site without a build step.

Examples

  • Minify an inline <style> block for a landing page.
  • Compress a small analytics or widget script before pasting it into a template.

Common mistakes

  • Minifying the only copy of your source; always keep the readable original.
  • Minifying JavaScript that relies on automatic semicolon insertion without testing the result.