Skip to Content

Free HTML Formatter

Indent minified or machine generated HTML so you can actually read the structure.

  • Processed in your browser
  • 5 free uses a day, 50 with a free account
  • No watermark
  • Updated

Use the HTML Formatter

What is an HTML Formatter?

Markup that came out of a minifier, a CMS export or a browser view-source is often one enormous line. Reading the structure of it by eye is close to impossible.

Paste it here and get it back indented, one tag per line, with the nesting visible. Choose two or four space indentation.

Void elements such as img, br and input do not increase the indent, which is what makes the output match the real structure rather than drifting one level deeper with every self closing tag. The contents of pre, textarea, script and style are left exactly as they were, since reformatting those changes meaning.

Frequently asked questions

Does formatting change how the page renders?

Adding whitespace between block level tags does not. Adding it between inline elements can introduce a visible space, so format for reading and keep the minified version for shipping.

Does it fix broken HTML?

No. It indents what you give it. An unclosed tag will make the indentation drift, which is often a fast way to spot exactly where the markup went wrong.

Will my inline scripts be reformatted?

No. Script, style, pre and textarea contents are preserved exactly.

Is anything uploaded?

No, it runs in your browser.

Need another pair of hands on the build?

BitsSolved writes React and Go, demos working software every week, and leaves the code in your repository. This tool platform is our own work running in production.

Tell us what you need built.

The first call is free and is mostly us asking questions. After it you get the scope in writing and a fixed quote for the first phase.

Based inTamil Nadu, India
First callFree, and mostly us asking questions