HTML Formatter

Indent and beautify HTML so nested tags are easy to read.

How to use HTML Formatter

  1. Paste your HTML.
  2. Choose the indent size.
  3. Copy or download the formatted HTML.

Supported features and limitations

Each tag and text run goes on its own line, which can add visible spaces between inline elements in the formatted copy. Contents of <pre>, <textarea>, <script> and <style> are preserved.

Privacy

Everything you type is processed locally in your browser and is not sent to our servers. No account is needed and there is no watermark.

Frequently asked questions

Does it fix broken HTML?

No, it only re-indents what it is given.

Can I use the output in production?

Prefer the original or minified source for production; formatted HTML is for reading.

Related tools

More Developer & Webmaster Tools · All free tools