About the HTML Formatter
Paste minified or badly indented HTML and get clean, readable markup. Embedded <style> and <script> blocks are formatted too. Switch to Minify to strip comments and collapse whitespace for production.
Features
- Indents nested elements correctly
- Formats inline CSS and JavaScript
- Configurable wrap length and indentation
- Minify mode removes comments & whitespace
- Preserves
<pre>and<textarea>content
How to use it
- Paste HTML into the input pane.
- Pick Beautify or Minify and your indentation.
- Copy or download the output.
Frequently asked questions
Is the HTML validated?
The formatter is tolerant like a browser — it formats even invalid HTML. Use it to make structural problems visible rather than as a strict validator.
Is minification safe?
The minifier removes comments and collapses whitespace between tags, but keeps whitespace inside <pre>, <textarea> and scripts. Test the result in your target browsers as with any minifier.