Indent minified or badly laid-out HTML so it can be read. Useful for understanding code a tool spat out, reviewing a template, or seeing what is inside an HTML email.
It respects inline elements and does not break text in the middle of a paragraph, which is what makes automatic indentation useful rather than annoying.
How to use it
- Paste the markup.
- Adjust the indentation.
- Copy or download the result.
Frequently asked questions
- Does it change how the page looks?
- With well-formed HTML it should not. Whitespace between inline elements does count, so check if you have delicate inline-block layout.
- Does it work for JSX or templates?
- Only partly. JSX braces and tags like {{ }} or <?php ?> confuse it, because it parses HTML and nothing else.
- What about minifying it?
- This tool goes the other way. For page weight, the CSS and JavaScript matter most, and both have their own tools here.
Related tools
Minify CSSCSSO: it restructures and merges rules, not just strips spaces.
Minify JavaScriptTerser in the browser, with optional name mangling.
Count words and charactersA live count, reading time and the limits each platform imposes.
Change letter caseUPPERCASE, lowercase, Title Case, camelCase, snake_case and more.
Sort and clean up linesSort, drop duplicates and blanks, number or reverse a list.