APImcp
GuidesDeveloper Tools
ConsoleDocsMCP
Developer Tools ⏱ 1 min read

CSS Inliner API — Convert CSS Classes to Inline Styles

Convert external CSS styles to inline style attributes. Essential for email HTML where inline styles are required for consistent rendering. Free API.

01

What is CSS Inlining?

CSS inlining takes CSS styles defined in style tags or external stylesheets and applies them as inline style attributes on individual HTML elements. This is essential for HTML emails where email clients strip <style> tags but preserve inline styles. The inliner handles class selectors, element selectors, descendant selectors, and media query extraction.

02

How to Use It

Call GET /api/v1/css-inliner?html=%3Cstyle%3E.a%7Bcolor:red%7D%3C/style%3E%3Cdiv+class%3Da%3Ex%3C/div%3E. Returns { inlined: string, rules_applied: number, warnings: string[] }.

Try it live Test this endpoint in the interactive console
Open Console →

Frequently Asked Questions

Does it handle responsive CSS?
Media queries are preserved in style tags but not inlined. The inliner focuses on making base styles survive email client rendering.