HTML
<div>\n <p>a</p>\n</div>
Minified
<div><p>a</p></div>
Developer Tools
Minify HTML fragments locally by removing extra whitespace and line breaks. Useful for template cleanup and size comparison without uploading markup.
Favorite this tool
No favorite storage mode has been selected.
Quick actions
Copy this tool URL or open the system share sheet on a supported device.
开发工具
等待输入
已复制结果
HTML
<div>\n <p>a</p>\n</div>
Minified
<div><p>a</p></div>
Light rules mainly target whitespace between tags. In edge cases, pre or textarea regions may be affected, so validate important fragments first.
It cleans common removable whitespace while aiming to preserve normal tag structure. Conditional comments and special markup still need manual checks.
Tools
Continue with another translated tool for a nearby task.
CSS Minifier
Minify CSS locally by removing extra whitespace and comments. Useful for quick size cleanup of static snippets before release.
JSON Minifier
Minify formatted JSON into a compact single line in your browser. Syntax is checked before output—useful for smaller configs, API payloads, and local storage.
SQL Minifier
Minify multi-line SQL into a compact single line locally in your browser, with an option to strip comments. Useful for log embedding, payload size checks, and transport.