How to use
- Paste text, open a UTF-8 file, or try the Sample.
- Choose the input and settings, then run the tool or enable Auto run.
- Review the result, then copy or download it. Changing the input invalidates the previous result.
HTML Formatter
Format HTML markup with readable indentation and controlled whitespace.
Processing runs in your browser. Your input is not sent to DevToolsy.
How it works
Prettier formats HTML as source text. It never renders the submitted markup or executes scripts. Embedded script and style content is left unformatted.
<main><h1>Project notes</h1><p>Built with <strong>care</strong> for the web.</p><ul><li>Fast</li><li>Local</li></ul></main><main>
<h1>Project notes</h1>
<p>Built with <strong>care</strong> for the web.</p>
<ul>
<li>Fast</li>
<li>Local</li>
</ul>
</main>
Format HTML markup with readable indentation and controlled whitespace.
Options and data fidelity
Choose CSS-aware, strict or ignore whitespace behavior, plus indentation and line width. CSS-aware is the default; ignore mode can change visible spacing in inline content.
Working with the result
Formatting does not audit semantics, accessibility or dangerous markup. Review the output in your own project and use dedicated validators before publishing.
Review the result, then copy or download it. Changing the input invalidates the previous result.
UTF-8 input up to 1 MiB per document, output up to 8 MiB. JSONPath and Schema: 5-second timeout; other tools: 30 seconds.
Frequently asked questions
Is submitted HTML rendered or executed?
Prettier formats HTML as source text. It never renders the submitted markup or executes scripts. Embedded script and style content is left unformatted.
How is meaningful whitespace handled?
Choose CSS-aware, strict or ignore whitespace behavior, plus indentation and line width. CSS-aware is the default; ignore mode can change visible spacing in inline content.
Does formatting validate accessibility or security?
No. Formatting does not audit semantics, accessibility or dangerous markup. Review the output in your own project and use dedicated validators before publishing.
Is my input uploaded?
Processing runs in your browser. Your input is not sent to DevToolsy.
Can I open a local file?
UTF-8 input up to 1 MiB · output up to 8 MiB