Convert inline CSS to external CSS in seconds. Paste HTML with inline styles, generate a clean stylesheet, and keep your markup easier to maintain. Processing runs entirely in your browser.
The Inline CSS to External CSS Converter helps you move inline style attributes out of your HTML and into a separate CSS output.
This creates cleaner, easier-to-maintain markup and a reusable stylesheet you can link with
<link rel="stylesheet" href="styles.css">.
style attributesid and class names when building selectorsstyle attributes from the cleaned HTML outputstyles.css.<link rel="stylesheet" href="styles.css">.Input HTML:
<div id="hero" style="color: white; background: #222;">
<p class="lead" style="font-size: 20px; margin-top: 12px;">Welcome</p>
</div>
Generated CSS:
#hero { color: white; background: rgb(34, 34, 34); }
.lead { font-size: 20px; margin-top: 12px; }
Clean HTML:
<div id="hero">
<p class="lead">Welcome</p>
</div>
id or class selector is available, the tool falls back to positional selectors.