ST

SnapTool.top

Loading...

🌐

HTML Formatter

Format and minify HTML online with syntax highlighting, line numbers, and one-click copy.

Input HTML
Formatted Output

About HTML Formatter

Format and minify HTML for readability and clean sharing. If your markup contains CSS or JS payloads, refine them with the CSS Formatter and JS Formatter/Minifier.

Great for templates, pages and snippets with one‑click copy. For encoded markup, first decode via URL encoding/decoding or Base64 encoding/decoding.

Common Use Cases

  • Beautify markup for review
  • Share clean snippets
  • Prepare template HTML
  • Inspect generated HTML

How It Works

  • Applies consistent indentation
  • Normalizes whitespace
  • Warns when input is invalid
  • One‑click copy

FAQ

Will scripts be changed?

No, formatting preserves content; only whitespace is adjusted. Use JSON Formatter to inspect embedded JSON inside script tags.

Does it support large files?

Yes for typical pages.

Is data uploaded?

No, runs locally in your browser.

Can I copy with line numbers?

Copy button copies pure HTML without line numbers.