Email-Safe CSS Inliner

Inline simple <style> rules into style attributes so HTML email renders consistently across clients.

About this tool

Merges declarations from simple <style> selectors (element, class, id, and comma lists) into inline style attributes on matching elements, which is essential for consistent HTML email rendering. Existing inline styles take precedence and are not duplicated, while @media and @font-face rules are preserved in a retained <style> block. Built for email developers; it is regex-based, so use simple selectors.

Frequently asked questions

Why do I need to inline CSS for email?

Many email clients (notably Gmail and older Outlook) strip or ignore <style> blocks, so styles must live in inline style attributes to render reliably.

What selectors does the inliner support?

Simple single-token selectors: element (p), class (.btn), id (#lead), and comma-separated lists of those. Descendant, child, attribute and pseudo selectors are skipped.

What happens to @media queries?

@media and @font-face rules cannot be inlined, so they are kept inside a retained <style> block at the top of the output. Inline styles you already had on an element always win over the merged rules.

An unhandled error has occurred. Reload ×