HTML Formatter

Beautify messy or minified HTML with consistent indentation, powered by Prettier and running entirely in your browser.

How to use

  1. Paste your HTML.
  2. Click Format.
  3. Copy the formatted markup.

Examples

Inline to structured
Input: <div><p>Hi</p></div>
Output: <div> <p>Hi</p> </div>

Frequently asked questions

Is my HTML sent anywhere?

No. Formatting is local. Nothing leaves your device.

Related tools