HTML Minifier
The HTML minifier collapses whitespace between elements, removes comments and strips optional quotes where it is safe to do so, reporting how many bytes were saved. Content inside <pre>, <textarea>, <script> and <style> is never touched.
Your result will appear here.
Not sure where to start? Use Load example.
Results update automatically and are calculated on your device. Nothing you type is sent to a server.
Runs in your browser. Processing happens entirely in your browser. Nothing you enter is sent to Delimiter.live.
How to use the HTML Minifier
- Paste the HTML you want to shrink.
- Decide whether comments should be stripped.
- Check the size saving, then copy or download the result.
Example
<div> <p>Hi</p> </div>
<div><p>Hi</p></div>
Common use cases
- Reducing the size of an email template where every byte counts.
- Compacting an inline HTML fragment stored in a database or a JSON field.
- Preparing static markup for a build that has no minification step.
Limitations and things to watch for
- Whitespace between inline elements is significant — removing the space in "<a>one</a> <a>two</a>" would visibly join the words. The minifier collapses runs of whitespace to a single space rather than deleting them entirely, so rendering never changes.
- Conditional comments are preserved because removing them changes behaviour in legacy browsers.
- Server-side gzip or Brotli compression saves considerably more than minification. Use both where you can.