HTML Minifier

Remove unnecessary characters and compress HTML code.

Browse all Code Tools

About HTML Minifier

Minifying HTML removes whitespace, comments and other characters that browsers do not need, which makes the file smaller. This tool minifies your HTML in one click.

How to use HTML Minifier

  1. Paste your HTML into the input box, or click Example to load sample code.
  2. Click Minify HTML.
  3. Copy the minified result, or click Clear to start again.

Common uses

  • Reducing the size of landing pages and email templates.
  • Preparing HTML for production before you deploy.
  • Removing comments from copied code.
  • Comparing the size of a page before and after minifying.

Tips

  • Keep the original, readable file for editing and use the minified version only for the live site.
  • Test the minified page in a browser, especially if it contains inline scripts or preformatted text.