Use the formatter when you receive unreadable HTML — from a server-rendered template, a CMS, an email builder, or a legacy codebase. Properly indented HTML makes it easy to see the nesting structure, find unclosed tags, and identify duplicate elements.
Use the minifier before deploying static HTML. Removing whitespace and comments from a 100 KB HTML document typically saves 15–30 KB, which directly reduces Time to First Byte (TTFB) and improves Core Web Vitals. For server-rendered apps, most frameworks (Next.js, Nuxt, Astro) minify HTML automatically in production builds.
For email templates specifically, formatted HTML is essential during development — email clients have notoriously strict parser quirks, and readable code makes debugging far easier. Run the minifier only as a final step before sending.