Z

HTML Minifier

Minify HTML with html-minifier-terser. Collapses whitespace, removes comments, inline CSS / JS minification. Size savings shown live.

Free No signup Client-side Privacy friendly

Size:

Size: · saved %

Working…

How to use

  1. 1 Paste your HTML on the left.
  2. 2 Toggle whitespace collapse, comment removal, inline CSS / JS minification.
  3. 3 Click Minify — see size savings instantly.

Why use this tool

  • Powered by html-minifier-terser — the maintained successor to html-minifier.
  • Inline <style> blocks are passed through clean-css; inline <script> blocks through terser.
  • Library is lazy-loaded — page is light until you click Minify.
  • Side-by-side size comparison and direct file download.

Frequently asked questions

Will it break my HTML?

Conservative defaults keep attribute quotes, void-element tags, and DOCTYPE. Test before deploying to production templates.

How do I format it back?

Use the <a class="underline" href="/html-formatter">HTML Formatter</a> to pretty-print the minified output for inspection.

Does it minify SVG inside HTML?

Whitespace and comments inside SVG are collapsed, but element-specific SVG optimisation is not run — use SVGO separately for that.

Summary

HTML Minifier is a free developer utility by Zerethon Tools. Minify HTML with html-minifier-terser. Collapses whitespace, removes comments, inline CSS / JS minification. Size savings shown live. Runs entirely in the browser — no signup, no upload.

Category
Developer
Pricing
Free
Privacy
Browser-based
Signup
Not required

Privacy

Your data never leaves your browser unless explicitly stated. HTML Minifier runs entirely client-side — no server upload, no logging, no tracking of your input.

Related tools

Build, share, and grow on Zerethon Social

Free signup. Earn points, collect achievements, and connect with creators worldwide.

Try Zerethon free