HTML minifier
Shrink HTML by removing comments and extra whitespace, leaving <pre>, <textarea> and scripts untouched.
Runs in your browserNothing uploadedWorks offline
Set up for this job. It runs on JS, CSS and HTML minifier, where every option is there to change.
Loading HTML minifierRuns on this device. Nothing is uploaded.
Questions
What does it remove?
Comments and extra whitespace between tags and attributes. Conditional comments are kept, and you can tick Keep comments to keep all of them.
Is it safe for my page?
It is deliberately cautious: the contents of <pre>, <textarea> and <script> are left as they are, and inline <style> blocks are minified only when that option is on.
Is my code uploaded?
No. Minification runs in this tab. Nothing you paste leaves your device.
Related tools
All developer toolsDeveloperjs mjs cjsJS, CSS and HTML minifierMinify JavaScript with Terser, and CSS and HTML with a careful whitespace and comment stripper. See the size before and after.Developerjs mjs cjsCSS minifierShrink CSS by removing comments and whitespace, keeping strings, url() values and license comments safe.Developerhtml htmHTML viewer and live editorPaste or open HTML and see it render live as you type, at phone, tablet or full width, with one-click formatting and scripts off unless you turn them on.Developerjs mjs cjsJavaScript minifierMinify JavaScript with Terser: comments and whitespace removed, local names shortened, license comments kept if you like.DeveloperBase64 encode and decodeEncode text or any file to Base64 and decode Base64 back to text or the original file, with a URL-safe option.DeveloperBinary to decimalConvert binary numbers of any length to decimal, with hex and octal shown too, exactly and as you type.