HTML Formatter

Format and beautify your HTML markup with proper indentation and syntax highlighting.

Tools run in your browser. Shared links may include your input; check the URL before sharing.

How to use

  1. Paste an HTML document or fragment.
  2. Format and inspect tag nesting and attributes.

This example illustrates one supported operation. Choose the matching mode and settings above; generated values and formatting may vary.

Example input or settings

<main><h1>Hello</h1><p>SkillPeek</p></main>

Example result

<main>
  <h1>Hello</h1>
  <p>SkillPeek</p>
</main>

Does formatting sanitize HTML?

Formatting is not sanitization. Sanitize untrusted HTML before rendering it in your application.