Paste an HTML email that uses a <style> block and get the same email with every rule written into inline style attributes, the format Gmail, Outlook and other email clients handle best. Media queries and :hover rules stay in a style block, and a live preview shows the result.
Last updated:
Preview
Advertisement
Advertisement
How to use the CSS Inliner
Paste your HTML email or open an .html file. Click Sample to try it.
Pick the options: remove style blocks, keep media queries, keep !important, add width attributes.
Click Inline CSS; the output updates as you type.
Check the preview at desktop and mobile width.
Copy or download the inlined HTML and paste it into your email platform.
Before and after inlining
The inliner reads each CSS rule, finds every element it matches and writes the winning declarations into that element's style attribute.
beats any selector (unless the rule is !important)
HTML email tips
Use tables with role="presentation" for layout; flexbox and grid are not supported by many email clients.
Write colors as 6-digit HEX and sizes in px; shorthand values and rem units are less reliable in older clients.
Keep the total email size under about 100 KB: Gmail clips longer messages and hides the rest behind a link.
Always send a test to real inboxes after inlining, since every client has its own quirks.
Frequently asked questions
Why do HTML emails need inline CSS?
Many email clients strip or ignore style blocks in some situations, for example certain Gmail views, older Outlook versions and some webmail apps when an email is forwarded. Styles written directly in each element's style attribute are the most reliably supported, so inlining makes the email look the same everywhere.
Which rules cannot be inlined?
Media queries, :hover and :focus states, pseudo-elements like ::before, @font-face and @keyframes have no inline equivalent. With the keep option on they are collected into a single style block in the head, so clients that support them still use them.
How does the inliner decide which style wins?
It follows the CSS cascade: !important declarations beat normal ones, then higher specificity wins (id over class over tag), then the later rule wins. A style attribute already on the element counts as the most specific, so your manual overrides are kept.
Should I keep !important in the inline styles?
Usually not. Once a style is inline it already has top priority, and some clients handle !important inline badly. Keep the option off unless you need it to beat a client's own styles. !important rules inside media queries are always kept, because they must override the inline styles.
Is my email template uploaded anywhere?
No. Parsing and inlining run entirely in your browser using the built-in HTML parser, and the preview is rendered in a sandboxed frame with scripts disabled. Nothing is sent to a server.
Why are width and height attributes added?
Some versions of Outlook ignore CSS widths on images and tables but respect the HTML width and height attributes. The inliner copies pixel values from the CSS into those attributes so the layout holds.
Does it support external stylesheets?
Linked stylesheets cannot be fetched from the browser for privacy and security reasons. Copy the CSS file's contents into a style block in the head and run the inliner again.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.