HTML Minifier
Reduce HTML whitespace and ordinary comments. Review the compact source, then copy or download it.
How to use it
- Paste HTML or open a UTF-8 file. Load the example to try it.
- Select Minify HTML.
- Review the output. If an error appears, correct your input and try again.
- Copy the result or download html-minifier.html.
Choose what gets removed
Whitespace collapsing uses conservative single spaces. Disable it when CSS white-space rules or templates depend on exact spacing. Preformatted content, scripts, and styles are not minified. License comments beginning with !, conditional comments, server-side includes, and ToolPixels markers are kept. Output is not sanitized: only use it in a trusted context.
Only the required local processor is loaded when you run the tool. Large jobs run in a cancellable background worker. Source and results remain text, including scripts, markup, and URLs.