HTML Minifier
Minify HTML to make files smaller and pages faster.
How it works
- 1Paste your HTML.
- 2It is minified as you type.
- 3Copy or download the result.
Features
- Shows the size before and after.
- Inline CSS and JavaScript minified too.
- Errors reported clearly.
- Private: runs in your browser.
Frequently asked questions
What does it remove?
Comments (except conditional ones), whitespace between tags, and it minifies inline <style> and <script>. Content of <pre> and <textarea> is left untouched.
Can I undo it?
Use the HTML Formatter to make minified code readable again (renamed variables stay renamed).
Is my data sent anywhere?
No. Everything runs in your browser; nothing is uploaded.