Developer Tools

HTML Formatter with Worked Examples

Put each HTML tag on its own line to make minified markup readable. Enter html and read the result straight away. Minified “<div><h1>Title</h1><p>Hello</p></div>” comes back with <h1>Title</h1> and <p>Hello</p> each on their own line, indented inside the <div>.

01

Your inputs

Start with the example, or enter your own values.

Processed in your browser. Your inputs stay on this device.

02

Your result

A little clarity, coming right up.

Make room for the answer.

Enter your values and run the tool. Your result will appear here.

How to use the HTML Formatter

Paste HTML. Each tag starts a new line and nested tags are indented by two spaces. Inline tags inside text stay on the same line.

Examples

  • With the default values
    <div>
      <h1>Title</h1>
      <p>Hello <b>world</b>
      </p>

Limitations and assumptions

Confirm assumptions, units and applicable local rules before relying on results. Detailed content, accessibility and edge-case review remains ongoing.

Frequently asked questions

What does the HTML Formatter do?

Put each HTML tag on its own line to make minified markup readable.

How does the HTML Formatter work?

Paste HTML. Each tag starts a new line and nested tags are indented by two spaces. Inline tags inside text stay on the same line.

What should I keep in mind when using the HTML Formatter?

Confirm assumptions, units and applicable local rules before relying on results.

Can I see an example of the HTML Formatter?

Minified “<div><h1>Title</h1><p>Hello</p></div>” comes back with <h1>Title</h1> and <p>Hello</p> each on their own line, indented inside the <div>.

Is the HTML Formatter free to use?

Yes. It is free, needs no account and runs in your browser.