HTML minifier

Make HTML smaller for faster pages: comments and extra spaces are removed safely.

Free · No sign-up · Your files are processed on your device and never uploaded

How to use HTML minifier

  1. Paste or type…
    1

    Paste or type

    Put your content in the box - or try the example.

  2. Result appears instantly
    2

    Watch the result

    The result updates as you type - choose options above if needed.

  3. TXTCopy / Download
    3

    Download the result

    Ready in seconds. Your file never left your device.

Features

  • Removes comments and whitespace between tags.
  • Leaves pre, textarea, script and style untouched.
  • Conditional comments are kept.

Private by design

Everything runs in your browser. Nothing you paste is uploaded, logged or stored.

Questions

Is it safe for every page?

It is conservative by design; test the result in a browser before publishing.

More developer tools

All tools →