HTML Beautifier
Indent nested HTML tags so the markup structure is easy to follow.
Quick answer: enter your details below and click Beautify HTML — your result appears instantly, right here in your browser. Nothing you enter is uploaded or stored.
H
Developer
Enter your details below.
How to use
- Paste your HTML into the box.
- Click Beautify HTML.
- Read the indented structure and fix any nesting that looks wrong.
About this tool
This tool splits markup into tags and text, then indents each nesting level by two spaces. A matching open and close pair with only text between them stays on one line, which keeps short elements readable. Void elements such as br, hr, img, input, meta and link are treated as single lines that do not open a new level. It is a layout helper for reasonably well-formed markup, not a full HTML parser, so badly broken markup may indent oddly.
Frequently asked questions
What about void elements like br and img?
They are printed on one line and do not increase the indent level, because they have no closing tag.
Will it fix broken HTML?
No. It only re-indents what you give it; unclosed or mismatched tags may still indent in a misleading way.