跳到主要内容

HTML Minifier

開発者向け

Strip comments and whitespace between tags while keeping inline spacing and preformatted blocks exactly as they were.

正在加载工具…

使い方

3 ステップ
  1. 01

    Paste your HTML source

  2. 02

    Tick “keep comments” to preserve them, or “keep newlines” if your template needs line structure

  3. 03

    Copy or download the compressed result

よくある質問

3 件の質問
Q1Will the contents of <pre> or <textarea> be damaged?

No. Those blocks are extracted first and put back verbatim after compression, so code blocks and preformatted text never deform.

Q2Why is there still a space between two <span> elements?

Because that space really renders. Whitespace between inline elements counts as one space in the browser; removing it would join the words into “ab”. Only whitespace between block-level tags is dropped.

Q3Are line breaks inside text removed?

They are folded into a single space, not deleted — otherwise <p>hello⏎world</p> would become helloworld.

開発者向け