Runs in your browser
HTML Minifier
Shrink HTML by collapsing whitespace, stripping comments, and minifying embedded CSS and JavaScript — while leaving the content of <pre> and <textarea> untouched, since collapsing whitespace there would change what the page displays.
ReadyMinifiersFree · No account required
Related tools
Features
- Collapses whitespace and strips comments safely
- Never alters <pre> or <textarea> content
- Also minifies embedded CSS and JavaScript
- Shows original size, minified size, and percentage reduction
How to use
- Paste your HTML into the input.
- Click Minify.
- Copy or download the minified result.
FAQ
- Will this change how my page looks?
- No — it only removes whitespace and comments that don't affect rendering, and never touches the content of <pre> or <textarea>, where whitespace is meaningful.
- Does it minify inline CSS and JavaScript too?
- Yes, content inside <style> and <script> tags is minified as well.