Convert external CSS to inline styles for HTML emails.
CSS to Inline Styles copies CSS rules onto matching HTML elements as style attributes, the format email clients require. Selectors are matched by your browser's own engine, so class, id, descendant, child and attribute selectors all work, and conflicts are resolved by specificity, source order and !important.
Made for developers. Typical uses:
Rules for :hover, :focus, pseudo-elements and @media cannot be expressed as inline styles, so they are kept in a <style> block, which many email clients ignore.
Accuracy: Output is tested against known inputs. For production code, review the result and run your own tests.
Explore more in Developer Tools, read the guides and articles, or see how we test our tools.
Format and beautify messy CSS code with proper indentation.
Best for beautifying minified CSS for editing
Minify and compress CSS stylesheets to reduce file size.
Best for shrinking a stylesheet before deploying it to a production website to reduce load time
Generate responsive HTML email templates for your campaigns.
Best for building a newsletter template without hand-coding table-based HTML for email clients
Format and beautify messy HTML code with proper indentation.
Best for beautifying minified HTML for editing