🧾 HTML 格式化/压缩HTML Beautifier & Minifier
在线 HTML 代码格式化缩进和压缩,保留 script、style、pre 内容。Beautify (indent) or minify HTML while preserving script, style and pre blocks.
使用说明与常见问题How-to & FAQ
「HTML 格式化/压缩」是什么?What is the HTML Beautifier & Minifier?
在线 HTML 代码格式化缩进和压缩,保留 script、style、pre 内容。Beautify (indent) or minify HTML while preserving script, style and pre blocks.
如何使用「HTML 格式化/压缩」?How do I use the HTML Beautifier & Minifier?
在「HTML 格式化/压缩」中,把内容粘贴或输入到上方输入框,结果会实时显示在下方,点击「复制结果」即可复制。例如输入「<div><p>Hi <br>there</p><img src=x></div>」,得到「<div> ⏎ <p> ⏎ Hi ⏎ <br> ⏎ there ⏎ </p> ⏎ <img src=x> ⏎ </div>」。In the HTML Beautifier & Minifier: Paste or type into the input box; the result appears below instantly — click "Copy result" to copy it. Example: "<div><p>Hi <br>there</p><img src=x></div>" → "<div> ⏎ <p> ⏎ Hi ⏎ <br> ⏎ there ⏎ </p> ⏎ <img src=x> ⏎ </div>".
代码或数据会被上传吗?Is my code or data uploaded?
不会。「HTML 格式化/压缩」完全用 JavaScript 在本地运行,适合处理含有密钥、内部接口等敏感内容的数据。No. The HTML Beautifier & Minifier runs entirely in local JavaScript, so it is safe for data containing keys or internal endpoints.
「HTML 格式化/压缩」免费吗?需要注册吗?Is the HTML Beautifier & Minifier free? Do I need an account?
「HTML 格式化/压缩」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The HTML Beautifier & Minifier is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.