Processing your request...
Indent messy HTML or minify it without changing how the page looks, with unclosed-tag warnings and a safe preview.
586 B → 731 B · 26 lines
Valid HTML lets some closing tags be implied. The formatter adds them back when beautifying.
| Tag | Ends automatically |
|---|---|
| </li> | When the next <li> starts or the list ends |
| </p> | When a block element like <div>, <ul> or <h2> starts |
| </td>, </th> | When the next cell or row starts |
| </tr> | When the next row starts or the table ends |
| </option> | When the next option starts |
| </dt>, </dd> | When the next term or description starts |
| <br>, <img>, <input>, <meta> | Never closed: these are void elements |
Or open or drop an .html file.
Pick the indent size, or whether to keep comments.
Check the preview, then copy the result or save the file.
Indent messy HTML so it's easy to read, or shrink it for production.
Keeps <pre> and <textarea> exactly and never adds spaces between inline elements.
Points out tags that were never closed and closing tags with no opening tag.
See the page rendered with scripts turned off.
Your rating helps us decide what to improve.