HTML Formatter
Indent HTML markup and lay out attributes and elements consistently.
Runs on your device. Nothing you add is uploaded.
Formatted HTML
<section><h2>Field Notes</h2><p>Water the seedlings.</p></section>
How to use HTML Formatter
- Paste the HTML source.
- Choose your indentation width.
- Copy the output.
Questions
What does the tool change?
The formatter respects whitespace between HTML elements. Embedded JavaScript and CSS stay as they were.
Where is my input processed?
On your device. The tool does not upload the input or its result.
How this works
Uses the browser build of Prettier with the matching language plugin.
Everything happens in this browser tab. What you type or add stays on your device, and the page has no tracking. Your last settings are kept in this browser so the tool opens the way you left it. Privacy
Related tools
More in DeveloperCSS Formatter
Indent CSS selectors and declarations so a stylesheet is easier to read.
CSS Minifier
Remove unnecessary spacing from CSS while keeping values and selectors intact.
SQL Formatter
Format SQL statements for the database dialect you use.
JSON Formatter
Indent JSON so objects and arrays are easy to read.