HTML minifier
Shrink HTML by removing comments and the whitespace a browser does not need.
Missing a feature or found a bug in HTML minifier? Tell me on X (@_andrewtran) or by email.
How to use HTML minifier
- Paste your HTML in the input pane.
- Read the smaller result and the size saved.
- Copy it or download it as a file.
Questions and answers
Is my data sent anywhere?
No. Everything runs in your browser on this device. Nothing you paste is uploaded or stored.
Will my page look the same?
It should. A space between inline elements is kept because it shows, and pre, textarea, script and style are left as written.
Where are the other options?
This page opens HTML formatter with one choice already made. Every option of that tool is still here, and its own page says more about it.
Related tools
HTML formatter
Beautify HTML with consistent indentation, or minify it by removing comments and spare whitespace.CSS formatter
Beautify CSS rules and media queries, or minify CSS with strings and comments handled safely.JSON viewer
Explore JSON as a collapsible tree, with counts for every object and list.Mock data generator
Generate made-up users, orders and products as JSON, CSV or SQL, from a schema you can edit.