Home Tools Minify HTML

Minify HTML

Reduce HTML size by removing unnecessary whitespace and (optionally) comments. Runs locally in your browser — your code never leaves your device.

Quick stats

Input

0 B

Output

0 B

Saved

0%

Client-side No signup Copy & download
</>

Input HTML

Paste your HTML here

Options

Tip: If your page uses whitespace-sensitive rendering, disable “Collapse whitespace”.

Minified output

Result appears here

Privacy-friendly

This tool runs entirely in your browser. We don’t upload or store your HTML.

FAQ

Common questions about HTML minification

Is it safe to collapse whitespace?

Usually yes. However, some layouts or inline elements can be whitespace-sensitive. If something looks off, disable “Collapse whitespace”.

Do you modify inline JavaScript or CSS?

No. By default, script and style contents are preserved to avoid breaking functionality.

Does this tool upload my HTML?

No. Everything runs locally in your browser. Your input stays on your device.

Why is “Remove empty attributes” marked advanced?

Removing empty attributes can change behavior in edge cases. Use it only if you know the HTML is safe to modify.