How to use HTML Formatter & Beautifier — Indent HTML Online Free
- 1Paste your HTML into the left-hand box.
- 2The formatted version appears on the right, properly indented.
- 3Copy it, or download it as a file.
About HTML Formatter
Minified HTML is unreadable by design, and view-source on most production sites returns exactly that. This formatter puts the structure back: one element per line, one indent level per depth, so you can actually see what contains what.
The detail that separates a useful formatter from an annoying one is void elements. An <img> or a <br> has no closing tag, so treating it as an opening tag pushes everything after it one level deeper and the indentation becomes meaningless within a few lines. Those are recognised and left flat.
As with the minifier, <pre>, <textarea>, <script> and <style> are parked before any reformatting and restored afterwards, so code samples and inline scripts come back exactly as they went in.