Skip to content
Free Online Tools
All Tools Text Tools Developer Tools Generators Converters Calculators Data & Converters Web & Design Encoders & Ciphers Networking Games About Blog News

HTML Minifier

Developer Tools 100% in-browser

Remove comments and collapse whitespace to compress your HTML.

How to use the HTML Minifier

  1. 1 Paste your HTML.
  2. 2 Comments and whitespace between tags are removed.
  3. 3 Copy the minified HTML.

About the HTML Minifier

Minifying HTML trims comments and the whitespace between elements to reduce page weight. This tool compresses your markup while preserving the content of pre, textarea, script and style blocks.

It runs entirely in your browser.

Frequently asked questions

Does it break pre or textarea content?

No — whitespace inside pre, textarea, script and style is preserved.

Can I un-minify it?

Yes, use the HTML Beautifier.

Related tools

HTML Beautifier Paste minified or messy HTML to get clean, indented markup.
CSS Minifier Strip comments and whitespace to compress your CSS.
SQL Minifier Strip comments and collapse whitespace to compress SQL into a single line.

More from us

Recently used