UTILS.
Private by default
⊟

HTML Minifier

Minify HTML by removing comments and collapsing extra whitespace.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
output

About this tool

Shrink HTML by removing comments and whitespace that browsers ignore, processed entirely in your browser. Spaces between inline elements, and everything inside pre, textarea, script and style, are kept exactly.

Frequently asked questions

Does it remove comments?
Yes, ordinary comments are removed. Conditional comments (<!--[if …]>) are kept because some email clients still act on them.
Could it break my markup?
It only removes whitespace that does not render: runs of spaces become one space, and spaces next to block elements such as div, p or li are dropped. Content inside pre, textarea, script and style is copied unchanged. If your CSS sets white-space: pre on other elements, check those parts of the output.

More tools