CSS Inliner
Convert simple, flat CSS rules to inline HTML styles, with explicit rejection when different selectors match one element.
Start using
CSS Inliner
Convert simple, flat CSS rules to inline HTML styles, with explicit rejection when different selectors match one element.
The browser parses HTML and CSS. Text from all style elements is followed by the extra CSS. Rules with the same selector accumulate in source order. Original inline declarations retain their inline priority; !important is respected. The result is always a complete document beginning with a doctype, whether style tags are removed or retained.
Only flat style rules are converted. If different selector texts match the same element, conversion stops with an error instead of guessing specificity. At-rules and rules containing nested CSS are not expanded. Pseudo-elements, computed styles and external linked stylesheets are not converted. The browser may discard invalid CSS and normalize HTML.
Each editor accepts at most 500000 UTF-16 code units. Accumulated rule text, separators and original inline text across matching elements are limited to 4000000 UTF-16 code units; the final serialized output has the same limit. On a limit error, reduce HTML elements or CSS declarations and retry. These limits do not guarantee performance for arbitrary input.
Conversion runs locally using pasted CSS; external stylesheets are not fetched. The result is text, not a preview, download or sanitizer. Scripts and unsafe markup are not removed. Review the code before using it and test it in the target browser or email client; unchanged rendering is not guaranteed.
<style>p{color:red}</style><p>A</p>
→ <p style="color: red;">A</p>Processing takes place locally in your browser.