HTML Prettify
Your data never leaves your browserFormat and indent HTML markup for better readability.
Brie, Bug Reporting Tool
Fixing broken HTML in production?
Brie captures the DOM, console errors, and a full session replay so your team can see exactly what went wrong.
About HTML Prettify
Paste minified or unformatted HTML and instantly get a cleanly indented, human-readable version. Uses the browser's built-in DOMParser for parsing and applies consistent 2-space indentation, correctly handling void elements and nested structures.
How to use
- Paste your raw or minified HTML into the input panel.
- The formatted HTML appears instantly in the output panel.
- Click Copy to copy the prettified HTML to your clipboard.
More HTML Tools
Frequently Asked Questions
FAQs about HTML Prettify
What indentation does this use?
The formatter uses 2-space indentation for each nesting level.
Does it validate the HTML?
The formatter uses the browser's DOMParser which is lenient. For strict validation, use the HTML Validator tool.
Are void elements handled correctly?
Yes. Self-closing void elements like <br>, <img>, <input>, and <hr> are not given child indentation.
Will the doctype be preserved?
DOMParser normalises the HTML structure. For the most accurate round-trip, use the HTML Validator to check your markup first.
Is my data safe?
Yes. All formatting uses the browser's built-in DOMParser. No data is sent to any server.