Skip to content
KitWren
Website

HTML Formatter

Beautify messy or minified HTML with consistent indentation.

  1. Paste your input
  2. Choose the options
  3. Copy the output
Runs in your browser. Your data and files never leave your device.

About the HTML Formatter

Reformat HTML so nested elements are indented and easy to follow. Inline scripts and styles are formatted too.

Example

Minified markup like <ul><li><a href="/">Home</a></li><li>About</li></ul> becomes a nested list with each element on its own indented line, so you can see which tags are inside which.

Frequently asked questions

Will formatting change how my page looks?

Usually not, but extra whitespace can matter between inline elements such as links and images, and inside <pre> blocks. Check anything whitespace-sensitive after formatting.

Can it fix broken HTML?

It indents what’s there. Browsers are forgiving of missing closing tags, so fix structural problems in your source rather than relying on the formatter.