HTML Formatter

Beautify or minify HTML code with proper indentation.

Your data is processed in your browser and is not uploaded to our servers.

About the HTML Formatter

HTML Formatter cleans up messy or minified HTML by adding consistent indentation and line breaks, including embedded CSS and JavaScript. You can also minify HTML to reduce file size.

How to use the HTML Formatter

  1. Paste your HTML.
  2. Choose the indent size.
  3. Click "Beautify" or "Minify" and copy the result.

Frequently asked questions

Does formatting change how the page works?

Beautifying only changes whitespace, which browsers ignore in most places. Check content inside <pre> tags after minifying.

Is the code uploaded?

No. It is formatted locally in your browser.