HTML Minifier
Minify HTML β remove comments and inter-tag whitespace while preserving pre and script blocks.
Runs locally in your browser. Your input is not uploaded.
How to Use
- 1
Paste your HTML
Full pages or fragments both work.
- 2
Choose comment handling
Comments are stripped by default; tick the option to keep them.
- 3
Copy the single-line output
A footer comment reports the byte savings.
Frequently Asked Questions
- It removes HTML comments and collapses whitespace between tags into nothing and runs of spaces into one β while pre, textarea, script, and style blocks are protected so their content is untouched.
Related Tools
CSS FormatterMinify or beautify CSS stylesheetsJS FormatterMinify or beautify JavaScript codeHTML FormatterBeautify or minify HTML markupHTML EscapeEscape special HTML characters to entitiesHTML StripperRemove all HTML tags to extract plain textHTML EntitiesSearchable reference for all HTML entity codesSQL FormatterBeautify and format SQL queriesXML FormatterFormat, validate, and minify XML documents instantly