Convert SVG Presentation Attributes to CSS

Move fill/stroke into a <style> rule — not inline style=""

Strip inline styles? Strip inline stylesFill color with CSS? Fill color with CSS

FAQ

Quick answers

How do presentation attributes become CSS (not inline styles)?
Click Convert attrs to CSS. Shared fill/stroke values become classes and a <style> block — not style="fill:…" on each node.
Where is convert attributes to inline styles?
That is Convert Presentation Attributes to Inline Styles — a different page that writes style="".
Will convert-to-CSS keep unique colors?
Yes. Each unique fill/stroke pair gets its own class.
Can I turn those classes back into attributes later?
Yes. Convert SVG CSS Classes to Attributes applies the stylesheet back onto elements.
Strip inline styles → Fill color with CSS → Colors → CSS variables → Fill on hover →
Open full editor →

Source

Type or paste SVG markup. The preview on the right updates as you type.

Ready

Live preview

PNG export · 2× for retina