HTML Minifier

Minify HTML by removing comments and extra whitespace while keeping pre, textarea, script and style blocks intact. Runs locally in your browser.

About this tool

Paste HTML and get a smaller version with comments and redundant whitespace removed. Contents of pre, textarea, script and style elements are preserved exactly. This is a conservative minifier; always test the result. Nothing is uploaded.

Related: JSON Formatter & Validator · Base64 Encode & Decode · URL Encoder & Decoder · SHA-256 / SHA-1 Hash Generator · Unix Timestamp Converter