Skip to main content
Z

HTML Minifier — Compress HTML, Inline CSS & JS Online

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 Updated

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.

What is HTML Minifier?

An HTML Minifier is a tool that reduces the size of HTML markup for faster page loads. Built on html-minifier-terser, it collapses whitespace, removes comments, and minifies inline CSS and JavaScript, while showing the size savings live. Running entirely in the browser, it minifies HTML client-side so the markup is never uploaded to a server.

Summary

HTML Minifier is a free 開発者 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
開発者
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.

Sign up free