Clean up unreadable markup, shrink it for production, or convert characters to HTML entities so user content can be displayed without breaking the page.
Beautify with consistent tag indentation
Minify by stripping comments and redundant whitespace
Entity encoding for safely displaying markup as text
Frequently asked questions
When should I encode HTML entities?
Any time you display text that a user supplied. Encoding turns characters like < and > into entities so the browser renders them as text instead of executing them as markup.
Does minifying HTML break my page?
The minifier only removes whitespace and comments that do not affect rendering. Content inside pre and textarea elements is preserved.