What does an HTML formatter actually do?
It tokenizes the markup, tracks open/close tag depth, and re-emits each tag on its own line indented by its nesting level. Void elements (br, img, hr, input, meta, link, source, track, wbr) and self-closing tags do not increase indent depth. Whitespace inside <pre> blocks should be preserved by quality formatters; this one collapses surrounding whitespace but does not re-wrap text content.
How is it different from html-pretty-print?
There is no functional difference. "Format", "beautify", and "pretty print" all describe the same operation. We expose both URLs because both terms have search demand, but the algorithm is identical. If you arrived from a pretty-print bookmark, this is the canonical tool.
Will it fix my unclosed tags?
No. The formatter assumes well-formed input — it indents what it sees but does not invent missing close tags. For structural fixes, run the HTML Validator first to identify unclosed elements, fix them in source, then format. This separation keeps formatter behavior predictable.
How does it handle self-closing void elements?
Both <br> and <br/> are recognized as void. The formatter does not increase indent depth after a void tag and does not look for a matching close tag. Existing self-closing slashes are preserved as written — the formatter does not impose XHTML or HTML5 style on void elements.
Does it touch attribute order or values?
No. Attribute order is preserved exactly. Quote characters and values are passed through unchanged. The formatter only adjusts whitespace between tags — the attribute string between the tag name and the closing > is treated as opaque.
Will it format embedded CSS and JavaScript?
No. Content inside <style> and <script> is preserved verbatim. To format embedded JavaScript use the JS Beautifier; for embedded CSS extract the contents and run them through a CSS formatter, then re-embed.
Can I choose 4-space indent or tabs?
Yes. The Indent dropdown supports 2 spaces (default), 4 spaces, and tab. Selection takes effect on the next Format click — there is no need to clear and re-paste.
Is the HTML uploaded anywhere?
No. Formatting runs entirely in your browser. Pages containing CMS-generated content, internal layouts, or proprietary templates never leave your device. Open DevTools → Network and click Format to verify no request is made.