HTML formatter & minifier
Paste an HTML snippet or full document, choose 2- or 4-space indent, then Pretty-print or Minify. Fragments format in place; documents keep doctype and root. Copy or download formatted.html. Runs only in this tab.
Frequently asked questions
No. HTML snippets are parsed and serialized locally. Nothing is sent to LocalTools servers for processing.
No—the browser HTML5 parser is lenient and may normalize tags, void elements, and implied structure. Use the XML formatter when you need well-formedness errors.