SendReady

HTML Minifier

Free

Compress or prettify your email HTML. Removes comments, collapses whitespace, and minifies inline styles — fully compatible with MailChimp, Klaviyo, HubSpot, and more.

Drop your HTML file here

or click to browse · .html,.htm

or paste HTML directly

All processing happens in your browser. Your HTML never leaves your machine.

Why email HTML file size matters

Gmail clips any email that exceeds 102KB of HTML, replacing the rest of your message with a “Message clipped [View entire message]” link. When Gmail clips your email, your footer is hidden — which means your unsubscribe link disappears. Hidden unsubscribe links are a CAN-SPAM violation and a fast track to spam complaints. Klaviyo, Mailchimp, and other ESPs also impose their own size limits and may reject or truncate oversized uploads.

Email HTML grows large quickly. Template builders add layers of nested tables, inline comments, and formatting whitespace that never reaches the subscriber but counts toward the file size. CSS inlining — the process of moving <style> block rules onto each element — also adds significant size because every matched element gets its own style attribute. A complex responsive email template can easily reach 150–200KB before optimization.

Minification strips everything that doesn’t affect rendering: comments, redundant whitespace, empty attributes, and unnecessary characters in style values. The result is an email that looks identical to the subscriber but is significantly smaller on the wire.

How it works

  1. Paste your email HTML into the editor above, or drag and drop an .html file.
  2. Choose a mode — Minify to compress, or Prettify to reformat and indent the code for readability.
  3. Select options — remove HTML comments, collapse whitespace, minify inline style attributes, remove empty attributes, or preserve newlines for a less aggressive compression.
  4. Click “Minify HTML” (or “Prettify HTML”). The tool processes your code entirely in your browser.
  5. Copy or download the output and upload it to your ESP.

Frequently asked questions

What is Gmail’s email HTML size limit?

Gmail clips messages at 102KB of HTML. The clipping happens before rendering, so it is not visible in the Gmail preview — you only see it in the actual sent email. To test whether your email is clipped, send it to a Gmail address and look for the “Message clipped” footer. Anything above 90KB is worth optimizing to leave a safety margin.

Will minifying break my email?

No, if you use the default settings. The minifier preserves all HTML structure, attributes, and Outlook conditional comments (<!--[if ...]>). It only removes content that has no rendering effect — whitespace between tags, HTML comments (excluding conditionals), and redundant characters in style values. Always send a test after minifying to verify the output before sending to your full list.

What are Outlook conditional comments and why are they preserved?

Outlook on Windows uses the Microsoft Word rendering engine, which requires special HTML that other clients ignore. This HTML is wrapped in comments like <!--[if mso]>...<![endif]--> — a format that looks like an HTML comment but is actually read by the Word engine. Standard HTML parsers (and most email clients) skip them. The minifier preserves these comments while removing all standard <!-- ... --> comments.

When should I use Prettify instead of Minify?

Prettify is useful when you receive email HTML from a client or colleague that is a single minified line, and you need to read or edit it. It re-indents the code into a readable hierarchy. Prettified HTML is larger than the original, so it is a development tool — always minify before sending.

Does Klaviyo have an HTML file size limit?

Klaviyo recommends keeping email HTML under 100KB and imposes a hard limit at upload for some plan types. Mailchimp similarly recommends under 100KB for best deliverability. HubSpot’s marketing email editor has its own template constraints. Staying under 90KB gives you a comfortable margin across all major ESPs.

  • CSS Inliner — Inline your <style> block before minifying for the full optimization pipeline.
  • Spam Word Scanner — Check your email copy for phrases that trigger spam filters before you send.