HTML Minifier
Strip comments and whitespace to shrink HTML payloads before deploy.
HTML Minifier
Pre, textarea, script and style blocks are preserved. Aggressive mode can change inline spacing — test before deploying.
A conservative HTML minifier
The HitBidder HTML Minifier removes comments and redundant whitespace from delivered markup. It deliberately avoids aggressive rewrites: attributes, optional tags and raw-text blocks are left alone so the output is predictable and easy to diff.
Minification happens locally. Paste the markup from your rendered page or template, review the output and download it; nothing is uploaded or stored.
What gets removed
- Normal HTML comments, when Remove comments is enabled.
- Repeated spaces, tabs and newlines inside text nodes are collapsed to one space when whitespace collapsing is on.
- Whitespace-only gaps between common block-level tags are removed.
- Leading and trailing whitespace around the document is trimmed.
What is preserved
<pre>,<textarea>,<script>and<style>blocks are copied exactly, including indentation and line breaks.- Attribute order, quoting and values are unchanged.
- Conditional comments such as
<!--[if IE]>are kept. - Doctypes, entities and inline text spacing around inline elements are kept.
Safe vs aggressive whitespace
Inline elements can rely on the whitespace between them. The default mode only removes whitespace between block-level tags, which is normally safe. Aggressive inter-tag whitespace removes every whitespace-only gap and can join words when CSS makes an element inline. Use it only after checking the result visually.
Inline CSS and JavaScript
This tool does not minify the contents of <style> or <script>. Keeping
them intact avoids breaking strings, templates and regex literals. Use the dedicated CSS and JavaScript
minifiers for those blocks, then paste the results back if needed.
HTML minifier FAQ
Tools get you ready. Real traffic gets you results.
HitBidder is a free 1:1 traffic exchange. Give a click, get a click, and send real visitors to the pages you just finished optimising.