Skip to content
Created by Iternal Technologies, the AI Strategy ExpertsBy Iternal (opens in a new tab)

Format & Minify

HTML Minify

HTML

Paste HTML to remove whitespace between tags while leaving text and pre blocks unchanged.

Minified HTML

About HTML Minify

HTML Minify removes layout whitespace that sits between tags, so a pretty document collapses when it has no significant text. Words, attribute values, comments and character references are not rewritten.

The elements script, style, pre and textarea keep every character inside them. A space that shares a text node with a letter stays. A space that is the only thing between two tags does not.

Swap sends the result to HTML Beautify, which puts elements back on indented lines. Broken markup is reported instead of repaired, and the page does the work locally.

Frequently asked questions

What does HTML minify remove?

Only whitespace that sits between tags and contains no other characters. It does not change letters, attribute values, comments or the inside of script, style, pre and textarea.

Will a space between two words be removed?

Not when the space is in the same text as the words, as in a sentence inside a paragraph. A space that is the entire text between two tags is layout whitespace and is removed.

Are comments and raw elements changed?

Comment text, doctype text and the contents of script, style, pre and textarea are copied unchanged. Whitespace around those tags, outside the raw elements, is still removed.

Can beautify restore the minified markup?

Within this subset, beautify puts the elements back on indented lines. It will not put back a space that minify removed between two tags, because that space was layout whitespace.

Is the text I paste uploaded anywhere?

No. Minifying runs in your browser and the text you paste is never uploaded, logged or stored. Google Analytics records page views and feature use, never content.

Iternal · AI Blueprint Builder

Plan the AI initiative, not just the output

The AI Blueprint Builder scores each use case across value, feasibility, cost, governance, risk, adoption and readiness before you commit budget. Free to start, about 60 minutes.

Open the AI Blueprint Builder (opens in a new tab)