126+ free tools that run in your browser — no uploads, no sign-up

HTML Formatter

Beautify and indent minified HTML markup.

Minified HTML from a build step, a scraped page or a page-builder export is nearly impossible to read.

About HTML Formatter

Paste minified or poorly indented HTML and get back clean, properly nested markup that's easy to read and debug. This HTML formatter and beautifier is useful for inspecting scraped pages, tidying up exported markup from page builders, or reviewing templates before committing them to a codebase.

Minified HTML from a build step, a scraped page or a page-builder export is nearly impossible to read. The HTML formatter re-indents the markup so every nested element sits at the right depth, wraps long attribute lists, and keeps inline elements readable. It's a quick way to inspect structure, hunt for an unclosed tag, or tidy a template before it goes into version control.

How to use HTML Formatter

  1. Paste your HTML into the input area.
  2. Select the indentation width you prefer.
  3. Check the beautified markup in the output panel.
  4. Copy it back into your editor or download the file.

Key features

  • Proper nesting and indentation for block and inline elements.
  • Preserves the content of <pre>, <script> and <style> blocks.
  • Instant output as you type, with no server round-trip.
  • Copy and download options.

Common use cases

  • Reading the HTML source of an email template or saved web page.
  • Cleaning up markup exported from a CMS or drag-and-drop builder.
  • Spotting mismatched or unclosed tags by looking at indentation.

Frequently asked questions

Related tools

More Developer tools