How to use the SVG to Webflow
- In Figma, right-click your icon layer and choose Copy as → Copy as SVG (or export an .svg file).
- Paste it on the left. The tool strips Figma metadata and comments and, by default, switches colours to
currentColor. - Choose Custom Elements (native svg/path elements) or Code Embed, set the size (and optionally a class name), then click Copy to Webflow.
- In the Webflow Designer, select where it should go and press Ctrl/⌘+V. If Webflow doesn’t accept the paste, use the one-time calibration box (copy one Custom Element from Webflow and paste it into the tool), then try again.
Why paste SVG icons as embeds in Webflow?
Uploading an icon as an image asset works, but the SVG’s colours are then locked: you can’t change them on hover, in dark mode or per component. Placing the SVG code inside a Code Embed makes it part of the page, so it inherits CSS — with fill="currentColor" the icon simply takes the element’s font colour, and Webflow interactions or hover states can recolour it.
What the cleaner does
- Removes the XML declaration, comments,
<metadata>and editor attributes from Figma, Illustrator, Inkscape and Sketch. - Replaces hard-coded
fill/strokecolours withcurrentColor(keepsnoneand gradient references). - Adds a
viewBoxwhen missing and sets width/height to 100% so the wrapper div controls the size. - Marks decorative icons
aria-hidden="true", or addsrole="img"and a label for meaningful ones. - Strips scripts and inline event handlers for safety, and minifies the result.
Custom Elements vs Code Embed
Webflow’s Custom Element lets you create any HTML tag — including svg, path, g, circle and linearGradient — and give it attributes. Built this way, an icon is made of real Designer elements: you can see each path in the Navigator, add classes to individual parts, animate them with Interactions, bind attributes to CMS fields and edit values without opening code. A Code Embed is a single block of HTML: simpler, but a black box in the Designer.
| Custom Elements | Code Embed | |
|---|---|---|
| Edit in Navigator | Yes, every tag | No, edit the code |
| Classes & interactions per path | Yes | Only via custom CSS/JS |
| Complex illustrations | Many elements — can get heavy | Better choice |
How “Copy to Webflow” works
When you copy elements inside the Webflow Designer, Webflow puts a JSON description of them on the clipboard. This tool builds the same kind of data from your SVG — one Custom Element per tag, with all attributes, with the size you chose set on the root svg (or on an optional class) — so pasting creates native elements. Webflow doesn’t officially document this clipboard format, so if a future Webflow update ever changes it, the tool includes a calibration fallback: copy any Custom Element from your Webflow Designer, paste it into the calibration box, and the tool learns the current format and uses it from then on (stored only in your browser).
Tips for icons in Webflow
- No class is added by default. If you want shared sizing, enter a class name and reuse it; use fluid units if icons should scale with text.
- Very large or complex SVGs (illustrations, maps) are better as image assets — Embeds have a character limit (currently 50,000).
- For SVG backgrounds or masks, use the SVG to CSS tool; for React projects use SVG to JSX.
Tools that pair well with the SVG to Webflow
- Clamp Calculator — Enter a minimum and maximum size and the viewport range — get a zoom-friendly clamp() value with the maths explained, a live preview and a complete fluid type or space scale.
- Class Name Generator — Describe a section in plain words — “hero with tagline, heading, two buttons and an image on the right” — and get a consistent class structure in Client-First, BEM or simple kebab-case, ready to copy into Webflow as elements.
- Class Name Typo Checker — Paste HTML or enter a URL to audit every class name: catch typos like hero_heding, duplicates spelled differently (hero-title vs hero_title), auto-named Webflow classes like div-block-12, and Client-First or BEM rule breaks.
- HTML to Webflow Rich Text — Paste messy HTML — from an old site, WordPress export, Google Docs or Word — and get clean semantic markup that Webflow’s Rich Text element and CMS import accept without junk.
Frequently asked questions
Why doesn’t pasting into Webflow work?
Can I edit the SVG paths after pasting?
path, g or circle is its own element. Select it in the Navigator and edit its attributes (like d or fill) in the element settings, or give it a class to style it.How do I change the icon colour in Webflow?
Is it safe to paste SVGs from unknown sources?
foreignObject and inline event handlers, but you should still only use SVGs you trust.Does this work with multi-colour icons?
currentColor.