
HTML minifier
Shrink HTML for production without breaking <pre> blocks or inline spacing.
Runs in your browser. Pasted data never leaves it.
How to use it
- Paste your HTML or drop a file on the box.
- Choose Beautify to make it readable or Minify to make it small, and adjust the options.
- Press Run (it also runs as you type).
- Copy or download the result.
Questions
Is the HTML minifier safe?
It removes comments and collapses whitespace, but leaves <pre>, <textarea>, <script> and <style> contents alone (inline CSS is minified), and keeps the single space between inline elements, which affects how text looks.
Does minifying change what the code does?
No. Only whitespace, comments and names that can't be seen from outside are changed.
Is my code uploaded?
No. Formatting and minifying run in your browser, and your code never leaves your device.
How much smaller does it get?
The size of the result is shown under the output. Typical savings are 20–40% for CSS, 15–30% for HTML and 40–70% for JavaScript before gzip, and less after.
Is what I paste or test sent anywhere?
No. This page works entirely inside your browser, and pasted data never leaves your device. It makes no network requests while you use it, and the page also tells your browser to block them (a Content-Security-Policy with connect-src 'none'), so even a bug could not send your data out. To check it yourself, open your browser's developer tools, go to the Network tab, and use the tool: nothing will appear. There is no account, no analytics and no logging.
