Code tool

CSS Inliner

Inline simple embedded and pasted CSS into HTML style attributes locally, respecting specificity, order and !important. Output is text only, never a rendered preview.

In-browser processingNo account requiredPrivacy details ↗

CSS Inliner

Only comma-separated simple compound selectors made of element names, .classes and #IDs are supported, for example p.note or #title. No combinators, pseudo-classes, attribute selectors, at-rules, nesting, custom properties or shorthand declarations. Unsupported rules reject the conversion. Limit: 100,000 input characters, 2,000 elements, 500 rules and 5,000 matched elements across rules. Embedded style blocks precede added CSS. Existing inline styles take precedence unless a stylesheet rule is important. HTML is parsed in an inert template and never attached or executed; output is not sanitized and must be reviewed before use. External stylesheets are not loaded. Accepts HTML fragments, not full HTML documents or nested templates. Browser parsing may normalize markup. Only the listed properties are accepted. CSS variables and values containing semicolons, braces or @ are rejected.

Supported CSS properties

color, background-color, font-size, font-family, font-weight, font-style, line-height, text-align, text-decoration-line, text-decoration-color, text-decoration-style, letter-spacing, word-spacing, display, width, height, max-width, min-width, max-height, min-height, vertical-align, opacity, white-space, border-collapse, border-spacing, list-style-type, list-style-position; margin-top/right/bottom/left; padding-top/right/bottom/left; border-top/right/bottom/left-width/style/color

Ready. Input stays in this browser.

A QUICK WALKTHROUGH

How to use this tool

  1. Paste HTML and optional CSS.
  2. Inline supported rules.
  3. Copy and review HTML as text.

CSS Inliner

Only comma-separated simple compound selectors made of element names, .classes and #IDs are supported, for example p.note or #title. No combinators, pseudo-classes, attribute selectors, at-rules, nesting, custom properties or shorthand declarations. Unsupported rules reject the conversion. Limit: 100,000 input characters, 2,000 elements, 500 rules and 5,000 matched elements across rules. Embedded style blocks precede added CSS. Existing inline styles take precedence unless a stylesheet rule is important. HTML is parsed in an inert template and never attached or executed; output is not sanitized and must be reviewed before use. External stylesheets are not loaded. Accepts HTML fragments, not full HTML documents or nested templates. Browser parsing may normalize markup. Only the listed properties are accepted. CSS variables and values containing semicolons, braces or @ are rejected.

GOOD TO KNOW

Common questions

What are the supported limits?

Only comma-separated simple compound selectors made of element names, .classes and #IDs are supported, for example p.note or #title. No combinators, pseudo-classes, attribute selectors, at-rules, nesting, custom properties or shorthand declarations. Unsupported rules reject the conversion. Limit: 100,000 input characters, 2,000 elements, 500 rules and 5,000 matched elements across rules. Embedded style blocks precede added CSS. Existing inline styles take precedence unless a stylesheet rule is important. HTML is parsed in an inert template and never attached or executed; output is not sanitized and must be reviewed before use. External stylesheets are not loaded. Accepts HTML fragments, not full HTML documents or nested templates. Browser parsing may normalize markup. Only the listed properties are accepted. CSS variables and values containing semicolons, braces or @ are rejected.