Indent messy markup or minify it, with void elements and pre blocks handled correctly.
Void elements do not add indentation, and the contents of pre, textarea, script and style are left exactly as written.
A full page, a component, or a fragment copied out of a template. Minified markup with everything on one line is exactly what this is for.
Beautify indents each element by nesting depth, with two or four spaces. Minify removes comments and the whitespace between tags to make the payload smaller.
Void elements such as img and br do not open a new level, and the contents of pre, textarea, script and style are passed through untouched so nothing is corrupted.
No, it formats. Unlike the XML formatter, HTML tolerates unclosed tags by design, so the tool lays out what you give it rather than refusing. Use a validator if you need correctness checked.
No. Anything inside pre, textarea, script or style is passed through exactly as written, because reindenting those would change what the page displays or what the code does.
Because it is a void element and cannot contain anything. Void elements such as img, br, input and meta never open a nesting level, which is what keeps the output correct.
No. Formatting runs in your browser, so templates and client work stay on your machine.
Usually less than people expect once gzip is in play, since compression already handles repeated whitespace well. It is most worthwhile for markup embedded in a string, such as an email template.
No. Attributes are left exactly as you wrote them, including their order, quoting and spacing. Only the position of tags on the page changes.
Yes, including the doctype and comments. Very large documents are held in memory and reformatted on each keystroke, so extremely big pages will feel slow.
Yes, completely free with no sign-up.
Minify or beautify CSS with strings and data URIs left intact, and see how much smaller it got.
Open ToolIndent, validate and minify XML. Catches parse errors before you paste a broken feed or sitemap into production.
Open ToolEscape HTML special characters or convert named and numeric entities back into readable text.
Open Tool