Clean up markup, or squeeze it down for production.
Beautify mode parses the document and prints it with nested elements indented, long attribute lists wrapped and inline elements kept inline so that text does not gain stray spaces. Embedded style and script blocks are formatted with the matching language rules.
Minify mode removes comments, collapses whitespace between tags and keeps the content of pre, textarea, script and style elements untouched. Treat minify as a lightweight step, since a build pipeline can also compress CSS and JavaScript and rename identifiers.
The formatter is whitespace aware for inline elements, so rendering should not change. If you rely on exact whitespace inside an element, check pre and inline blocks after formatting.
It parses HTML leniently like a browser does, so many errors are tolerated. It will not rewrite markup to be valid.
Use the HTML to Markdown Converter for that.