Is this HTML formatter free?
Yes. This HTML formatter is completely free with no sign-up or limits on how much markup you format.
Does it upload my HTML to a server?
No. Formatting happens entirely in your browser, so the HTML you paste stays private on your device and is never uploaded.
Is this a full code editor?
No. It stays focused on beautifying pasted HTML quickly, not on full editing, linting, or project management.
Can I review the result before saving?
Yes. The formatted HTML stays visible so you can inspect it before you copy it or download it as a file.
Does it work on mobile?
Yes. The formatter runs in any modern browser, including mobile, so you can clean up HTML from your phone.
Why did my attribute order change?
The formatter sorts every element's attributes alphabetically before printing them, so class comes before href and id comes after both. It is deterministic, which means running the tool twice gives the same output, but it also means a formatted file will show as heavily changed in a diff even if you only wanted new indentation.
Where did my HTML comments go?
They are removed. The formatter only prints element nodes and text nodes, and a comment is neither, so it is skipped when the tree is walked. Keep an unformatted copy if the snippet carries licence headers, conditional comments, or build-tool markers that matter.
Does it fix broken HTML?
It silently repairs it, which is not the same as fixing it. The browser's own parser closes unbalanced tags for you, so <div><p>text<div> comes back as well-formed nested markup with no warning at all. The output is valid, but the structure may not be the one you intended, so compare the result against your source rather than trusting it.
Can I paste a fragment instead of a whole page?
Yes. Anything that does not start with <html> and contains no <head> or <body> is wrapped into a body automatically, so a bare <div> or a table row formats fine. One catch: <meta> and <link> tags pasted without a <head> wrapper are placed in the body by the parser, and they will be printed inside the <body> block.
Is my HTML uploaded anywhere?
No. The parsing and printing run entirely in your browser using the built-in DOMParser, and the markup never leaves the tab. Copy and Download build the file locally from the text already on screen.
Why is my <pre> block on a single long line?
Whitespace inside pre, code, script, style, and textarea is significant, so the formatter copies their inner HTML through untouched rather than re-indenting it. Re-indenting a <pre> would visibly change what the page displays, which is a worse outcome than a long line in the source.