Loona Automation logoLoona Developer Tools
Home › Code Generators

HTML Minifier

In short: compress HTML by removing comments and collapsing inter-tag whitespace — with pre, textarea, script and style blocks protected so their content is never mangled.
🔒 Private by design: everything runs in your browser on this device. Your input is never uploaded to a server.

Example

Input:

<div>  <p>hi</p>   <!-- note --> </div>

Output:

<div><p>hi</p></div>

About this converter

HTML minification is safe only if you respect the places where whitespace is content: inside

 and