Skip to content

フォーマッター&コード

HTMLフォーマッター

無料のHTMLフォーマッターとミニファイアです。Prettierのデフォルトのインデントと属性の折り返しで整形したり、本番向けにHTMLを一行に圧縮したりできます。ブラウザ内で完結し、何もアップロードされません。

Runs in your browser
HTML formatter & validator
lines: 0chars: 0size: 0 B
HTML · UTF-8 · 2-space indent

編集者注

Understanding · Indented HTML, sane defaults.

この詳細な解説章は現在、英語版のみで提供されています。上の変換ツールはあなたの言語で動作しますが、長文の解説記事はまだ翻訳されていません。

よくある質問

Quick answers.

Which HTML formatter is this?

Prettier's HTML parser with default settings — 2-space indent, 80-column target, attribute per line when the tag overflows. The minifier is a lightweight whitespace collapser that preserves <pre>, <script>, <style> and <textarea> content byte-for-byte.

Will it break my <pre>, <script>, or <style> blocks?

No — those blocks are protected from whitespace collapse during minification. Their content is extracted, the rest of the document is minified, then the blocks are restored verbatim.

Does it work on HTML fragments, not just full documents?

Yes. Paste a <div>...</div> or any partial tree; Prettier handles it the same way it handles a full document.

Is my HTML uploaded?

No — formatting and minification run entirely in your browser. Safe for sensitive markup.

他の人はこちらも検索しています

関連ツール

More in this room.

すべて表示 フォーマッター&コード