Free tool

HTML minifier

Comments, indentation and blank lines are for you, not the phone. Strip them safely — pre blocks, textareas and JavaScript strings are left alone — and see exactly how many kilobytes you saved.

Minify

Conservative on purpose: it never rewrites your code, only removes what the browser ignores.

Drop an .html fileor paste below

Does minifying matter for an APK?

Less than it does on the web, and more than nothing. On a website every kilobyte crosses the network; inside an APK the file is on the phone already, so download size is not the issue. What still matters is parse time — the WebView reads the whole document before it paints anything, and a 400 KB indented file with a hundred comments takes measurably longer to reach first paint than the same page at 180 KB — and the bundle limit: 5 MB of source content on the free tier, 18 MB on Pro. If you are near either, whitespace is the cheapest thing to remove.

It is also a mild form of tidiness. Comments that say <!-- TODO remove before launch --> ship to every user's phone otherwise, and anyone can read them by unzipping the APK.

What is removed, and what is not

That last point is the design choice. A real JavaScript minifier renames variables and rewrites expressions, which needs a full parser and can break code that uses eval or relies on function names. This tool is safe to run on anything; the price is that it saves less on script-heavy pages. If you need aggressive JS minification, run your build tool's minifier first and then this on the HTML.

Where it fits in the workflow

Write and test with the readable version. When you are ready to build, run the page through the merger if it is split into files, then through this minifier, and upload the result. Keep the readable source — the minified file is an output, not something to edit.

Frequently asked questions

Can this break my page?

It is designed not to: it removes only comments and whitespace, leaves pre and textarea content untouched, and never rewrites JavaScript tokens. The one case to check is CSS that relies on whitespace inside a content property with unusual quoting — rare, and visible at a glance.

Why did it only save 5%?

Because the file was already compact, or because its size is mostly embedded images or long strings. Whitespace is a small fraction of those. Resize images or move them into a ZIP as files instead.

Does it minify JavaScript properly?

It tidies: standalone block comments, indentation and blank lines. It does not rename variables or rewrite expressions. For that, use a real JS minifier (esbuild, terser) on the script before inlining it.

Is the file uploaded?

No. Minification is a set of string replacements run in your browser; the download is generated locally.

Read next

Related tools

Your HTML, installed on a phone today

Upload the file or ZIP, pick a name and an icon, and download a signed Android APK in minutes. Free to start — no Android Studio, no code changes, no card.

Convert HTML to APK — free