HTML Minifier

Minify HTML code in your browser. Reduce unnecessary formatting, inspect highlighted output and copy or download the result.

Input code

0 B
Loading code editor…

Output code

Loading code editor…
PASS IT ON

A useful tool is worth sharing.

HOW IT WORKS

Three steps. Ready for what’s next.

01

Add your code

Paste source code, upload a UTF-8 file, or load the example.

02

Minify the source

Choose the available options and process the code locally. Syntax colors and line numbers help you inspect both editors.

03

Copy or download

Copy the processed source or download it with the correct file extension.

About HTML Minifier.

HTML Minifier in your browser

Minify HTML code in your browser. Reduce unnecessary formatting, inspect highlighted output and copy or download the result. The input and output editors highlight HTML syntax and show line numbers. Processing runs in a local worker; source code is not uploaded or executed.

Minification options

Collapse ordinary HTML whitespace conservatively while preserving preformatted content and quoted attributes. Inline CSS and JavaScript remain unchanged unless their minification option is enabled.

Inspect before using

Copy the exact output or download a .html text file. HTML is shown as source rather than rendered as a webpage. Review and test the result with your application before replacing a deployed file.

A LITTLE CLARITY

Good questions. Simple answers.

A few helpful answers before you get started.

Do I need an account?

No. This tool is open to everyone without signing in.

Does this tool need the internet?

Code is processed locally in your browser. Source code is neither uploaded nor executed.

Still have a question?Get in touch