HTML Formatter

Beautify messy HTML with clean indentation. Choose the indent size and line wrapping, then copy or download the result.

How to use HTML Formatter

  1. Paste your HTML into the input box.
  2. Choose the indent size and whether to wrap long lines.
  3. Click Format, then copy or download the result.

Features

  • Adjustable indent and wrapping
  • Formats inline CSS and JavaScript too
  • Copy and download buttons

Supported formats and limitations

Formats the code but does not check it for errors or change what it does. Very large files may take a moment on a phone.

Frequently asked questions

Does formatting change how my page looks?

No. Only spaces and line breaks change, so the page works the same.

Is my code uploaded?

No. It is formatted in your browser.

Privacy: this tool runs in your browser. Nothing you add is uploaded to our servers.

Related tools