HTML Minifier

Terms of Service

About this tool

This free browser utility minifies HTML markup locally and lets you save a separate copy. Use it only if you agree to these terms.

Your responsibility

You retain ownership of your files. Selecting a file does not grant permission to publish it. Only process markup you are entitled to use. Review and test the output in your own environment before publishing; keep your original and a backup.

Limits

Whitespace collapsing is conservative: runs of whitespace become a single space instead of disappearing. Whitespace inside <pre> and <textarea> is preserved exactly, while inside <script> and <style> only the surrounding whitespace is trimmed. Ordinary comments are removed, while comments starting with !, server-side directives starting with #, and conditional comments are kept. Inline CSS and JavaScript minification is off by default. CSS minification only touches inline <style> blocks and style attributes; JavaScript minification only touches inline <script> blocks. Both use clean-css and Terser; neither renames identifiers, compresses expressions, or changes external files. Malformed markup is repaired rather than rejected, so confirm the structure still matches your intent. The tool does not validate your HTML or fetch linked assets. Input is limited to 5 MiB and must be UTF-8; UTF-16 files and a conflicting declared charset are refused. Minification runs in a worker with a hard time limit, so a document that stays busy past that limit is stopped.

Privacy

Selected markup is processed locally as described in the Privacy Policy. Your original is not overwritten.

Availability

The service is provided “as is” and “as available,” without a guarantee of compatibility or uninterrupted operation. Nothing here limits rights that cannot lawfully be excluded.

Components

This tool includes html-minifier-terser and parse5 with their runtime components under open-source licenses. See component license notices.

Changes

Features and these terms may change; updated terms apply to later use.