HTML Playground
Write and run HTML, CSS, and JavaScript with an instant sandboxed preview.
Code & CSS
Remove unnecessary whitespace, comments, and redundant markup from HTML directly in your browser.
Drop an HTML file here
.html or .htm, up to 2 MB
Keeps conditional and special comments.
Preserves sensitive element content.
Uses the standard HTML5 doctype.
Removes safe quotes, defaults, and boolean values.
Only removes attributes the minifier recognizes as safe.
Smaller output, best for standards-compliant HTML.
Processes style tags and style attributes.
Processes script tags and event handlers.
Ctrl/Cmd + Enter to minify
Paste HTML or choose a local file to get started.
Formatting inside pre, textarea, script, style, and code content is preserved unless you explicitly enable inline CSS or JavaScript minification.
Your HTML is processed in this browser. Files are read locally and are never uploaded to a server.
Keep building
Write and run HTML, CSS, and JavaScript with an instant sandboxed preview.
Convert CSS gradients into concise Tailwind background and text utilities.