15,432 developers used QuickKit today — 100% free, runs entirely in your browser

HTML formatter — beautify HTML markup online

Beautify HTML markup with proper nesting, consistent attribute formatting, and readable indentation

JSONSQLJavaScriptTypeScriptCSSHTMLMarkdownYAML
HTML formatter
Input
Loading editor…
Formatted output
Loading editor…

Ctrl+Enter to format

HTML-specific

Why use a HTML formatter?

HTML generated by CMSes, email builders, and web scrapers is notoriously unreadable — single-line walls of nested tags, inconsistent attribute quoting, and inline styles jammed into element strings. QuickKit's HTML formatter uses Prettier's HTML plugin to parse the document structure and reprint it with consistent indentation, one-attribute-per-line for complex elements, and properly closed void elements. The result is HTML you can actually read, review, and debug. Works on complete documents, fragments, email templates, Jinja2 and Handlebars templates, and single-file Vue components.

Questions

Frequently asked questions

Yes — inline <script> blocks are formatted as JavaScript and inline <style> blocks as CSS.
Prettier's HTML parser is lenient and will reformat most HTML even if it has minor issues. Invalid nesting may produce unexpected output.
Keep exploring

Related tools

All tools