HTML Minifier

Compress HTML for faster page loads

Minified output
Minified HTML appears here…

Basic minifier: it removes HTML comments and collapses whitespace. Content inside <script>, <style>, <pre> and <textarea> is left untouched, and it does not remove optional tags or shorten attributes. Everything runs in your browser, nothing is sent or stored anywhere.

About this tool

Bloated HTML slows every page view. Comments, indentation and blank lines help developers but cost bytes on every single load.

Minify your markup in one click and see exactly how many bytes you saved. A quick win for landing pages, email templates and embeds.

How to use the html minifier

  1. 1Paste your HTML.
  2. 2Click Minify.
  3. 3Copy the compact output.

Frequently asked questions

HTML comments and collapsible whitespace between tags. Content and attributes are preserved.

More free tools you might find useful.

Part of Developer Tools on JoliTools, free tools, no sign-up.