194 tools

HTML Minifier

Remove comments and whitespace from HTML.

Web Developer Tools

About the HTML Minifier

The HTML Minifier is a free online web developer tool from Toolbench. Remove comments and whitespace from HTML. Paste your text and the result updates instantly as you type or change the options.

Category
Web Developer Tools
Price
Free
Account
Not required
Runs
Entirely in your browser

How to use the HTML Minifier

  1. Paste or type your text into the input box.
  2. Adjust the options (remove comments, remove whitespace between tags, minify <style> blocks).
  3. Copy the result, or click “use output” to chain another transformation.

Example

With the default settings, this input:

<!-- hero -->
<div class="hero">
  <h1>Hello</h1>
</div>

becomes:

<div class="hero"><h1>Hello</h1></div>

Options

Remove commentsOn / off (default on)
Remove whitespace between tagsOn / off (default on)
Minify <style> blocksOn / off (default on)

Privacy

Everything runs in your browser: what you type or paste is processed by JavaScript on your device, not on a server. If you are signed out, nothing is saved at all. If you sign in with Google, your inputs and settings are saved privately to your account so they sync across devices.

Frequently asked questions

Is the HTML Minifier free?

Yes. HTML Minifier is completely free with no sign-up, no usage limits and no watermarks.

Is my data private?

Yes. The HTML Minifier processes everything in your browser. Signed out, nothing is saved; signed in, your inputs sync privately to your own account.

Does it work on my phone?

Yes. Toolbench runs in any modern browser on desktop, tablet or phone — there is nothing to install.

Related web developer tools

All 16 web developer tools →

Last updated