HTML Formatter

Free HTML formatter and beautifier: turn minified or messy HTML into clean, indented code that is easy to read. Pretty print HTML in one click.

  • 100% free
  • No sign-up
  • Runs in your browser

Webmaster Tools

About the HTML Formatter

The HTML Formatter, also called an HTML beautifier, turns minified or messy HTML into neatly indented code, with each element on its own line. It makes code easy to read, review and edit.

You also see the number of input and output lines, tags and the size. Everything runs in your browser, so your text or code never leaves your device.

How to use this tool

  1. 1Paste your HTML.
  2. 2Read the formatted result.
  3. 3Copy it back into your editor.

Best-practice tips

  • Format code before you edit it; mistakes are much easier to see.
  • Minify it again before going live with the HTML Minifier.
  • Use it to read the source of a page copied from View Page Source.

Formatting vs minifying

Formatting adds indentation and line breaks so people can read code. Minifying removes them so browsers download less. Work on formatted code, publish minified code. Use the HTML Minifier for the live version, and the XML Formatter for sitemaps and feeds.

Answers

HTML Formatter FAQs

A tool that adds indentation and line breaks to HTML so it is easy to read.

Related tools

Continue with these related webmaster tools.