How it works
How to use the HTML Minify
Paste HTML
Or open a file.
Minify
Comments are removed and whitespace collapsed.
Copy or download
Use Beautify to reverse it.
Safe by default
Runs of whitespace are collapsed to a single space rather than removed, so inline text never runs together. Conditional comments and the contents of <pre>, <textarea>, <script> and <style> are preserved.
Built for developers
Why developers use it
Private by design
Runs 100% in your browser. Nothing you paste is uploaded, logged or stored on a server.
Instant results
Output updates as you type, with precise error locations when something is wrong.
Works offline
Once loaded, the tool keeps working without a connection. Install it as an app if you like.
Free, no sign-up
No accounts, no limits, no watermarks.
FAQ
Frequently asked questions
How much smaller will my HTML be?
Typically 10–25% for hand-written markup; more for heavily commented templates.
Is my data uploaded anywhere?
No. Everything runs locally in your browser — nothing you paste or open is sent to a server, logged or stored. The tool keeps working offline once the page has loaded.
Keep going
Related tools
- HTML FormatterBeautify or minify HTML markup
- HTML ViewerPreview HTML live while you edit
- HTML ValidatorFind HTML errors and accessibility issues
- HTML to JSX ConverterConvert HTML to React JSX
- HTML Pretty PrintPretty-print HTML with indentation
- HTML EditorEdit HTML with a live preview
- CSV to HTML tableConvert CSV to HTML table
- XML MinifyMinify XML by removing whitespace and comments