HTML格式化與美化工具
為壓縮或單行的HTML加上適當的縮排和換行進行格式化。
如何使用本工具
- 1
Paste your minified or single-line HTML into the input box.
- 2
Read the indented result that appears below as you type — there is no button to press.
- 3
Select and copy the formatted output from the result panel.
- 4
Spot-check anything with <pre>, <textarea>, comments, or inline scripts, since those are not handled perfectly.
什麼是HTML格式化與美化工具?
壓縮後的HTML是一長串字元:傳輸速度快,但無法閱讀。本工具可還原壓縮:每個元素單獨占一行,子元素多縮排兩個空格。空元素(img、br、input)保持在行內。輸出僅為美觀考量,算繪效果完全一致。
常見使用場景
Expanding a minified production HTML page so you can read its structure during debugging.
Tidying a snippet copied from a browser's DevTools Elements panel before pasting it into documentation.
Re-indenting a fragment of email or marketing HTML that arrived as one long line.
Inspecting the nesting and tag hierarchy of unfamiliar markup at a glance.
Cleaning up generated or template-output HTML before committing it to a repository.
Teaching or reviewing HTML structure where consistent two-space indentation makes nesting obvious.
常見問題
它會保留<pre>內部的空白嗎?▼
相關工具
JWT 解碼器
即時解碼 JSON Web Token(JWT)。完全在你的瀏覽器中執行:權杖絕不會離開你的裝置,可安全用於正式環境的密鑰。
JSON格式化與驗證工具
線上格式化、驗證和壓縮JSON。完全在你的瀏覽器中執行:你的資料永遠不會離開你的裝置。
XML 格式化工具
格式化並美化 XML 文件。適用於 SOAP、網站地圖、RSS 訂閱源和設定檔。
Base64 編碼與解碼工具
將字串編碼為 Base64,或將 Base64 解碼為文字。尊重你的隱私:全部在你的瀏覽器中執行。
URL 編碼與解碼工具
將文字轉換為 URL 安全的編碼(百分號編碼),或進行反向轉換。適用於查詢字串、重新導向和 OAuth 流程。
HTML實體編碼與解碼工具
將特殊字元轉換為HTML實體(&、<等),或進行反向轉換。適用於將文字安全地嵌入HTML。