← Tools

HTML Beautifier & Minifier

Tidy up HTML, or make it as small as it can safely be.

Private: your files never leave your device.

How it works

  1. Choose your files.
  2. Adjust the settings if you like.
  3. Download the result, or send it to another device with BroAllDone.

Frequently asked questions

How do I beautify HTML?

Paste your HTML or open a file, then tap Beautify HTML. Tags are indented neatly, and the CSS in <style> and the JavaScript in <script> are formatted too.

How do I minify HTML?

Tap Minify. Extra spaces and line breaks are removed, comments too if you like, and inline CSS and JavaScript are minified, so pages load faster.

Can minifying break my page?

It is made to be safe: a single space is kept wherever spacing could show on the page, and the case of SVG attributes is kept. If the HTML has a broken tag, it tells you instead of guessing.

Does it work with templates and frameworks?

Yes. Template tags such as {{ }}, {% %} and <?php ?> are left as they are, and Vue or Svelte files can be beautified too.

Can I choose the line length?

Yes. Leave lines as long as they are, or wrap them at 80 or 120 characters, with 2 spaces, 4 spaces or tabs.

Is my code uploaded?

No. Everything happens in your browser, so your code never leaves your device.

More free tools