Add animated SVG to Webflow

To add animated SVG to Webflow, you just need to follow one of the methods presented below:


I. Add animated SVG - animate on load:


1. Animate your SVG in SVGator.

Once you are done, just click on the Export button in the app’s header:

Export button in SVGator
Export button

2. In the Export panel, make sure you select “CSS Only” as the animation type, and let the animation start when the page loads (On load). Click the “Export” button:

Export CSS Only as animation type in SVGator
Export CSS Only as the animation type

3. In Webflow, go to the “Assets” panel, click on the “Upload” icon, and select the animated SVG that you just exported from SVGator:

Upload svg assets in Webflow
Upload Assets to Webflow

4. You can see that the SVG animation is playing in the preview thumbnail.

SVG animation playing in Webflow preview thumbnail
SVG animation in Webflow preview

5. You can simply drag it into your Webflow project, where you can edit its properties in the same way as you would for regular images.

Drag the SVG animation into the Webflow project
Drag the SVG animation to the Webflow project


6. After adjusting your animation as desired, navigate to the right side of the header, and click on the “Publish” button. This will make your changes live and visible on your website:

Use "Publish" button to make changes live and visible on Webflow
Use "Publish" button to make changes live on Webflow

II. Add interactive SVG animation:

Method 1 - Using embedded code:

We recommend this solution for interactive animations starting on mouse over.

1. Before exporting the SVG from SVGator with “CSS Only” as the animation type, set the animation to start “On mouse over”. You can also set the animation to Pause or Reset for the “On mouse out” setting. You can change the direction of the animation to be on “Reverse”, “Alternate” or “Alternate Reverse”.

Set the animation to start “On mouse over” in SVGator
Set the animation to start “On mouse over” 

2. Open the file in a text or code editing tool. Make sure that you select all the code and copy it to your clipboard. The code should look similar to this:

Open an SVG animation in a text or code editing tool
Open the SVG animation in a text or code editing tool

3. In Webflow, go to the Add panel and drag an Embed element into your canvas from the Components section. You can also use quick find (CMD/CTRL+E) and type “embed”.

Embed element to Webflow

4.  You can paste the SVG code from the clipboard here and click on the "Save & Close" button.

Paste the SVG code from the clipboard in Code Embed Editor on Webflow
Paste the SVG code

5. The animation will not be visible in the project edit mode. It only becomes visible after you publish and preview the website in the browser, where the animation will start on mouse over.

Publish and preview the SVG animation in browser
Publish, then preview the SVG animation in the browser

Note:
This method will only work for SVG files that do not exceed the 50,000 character code limit allowed by Webflow.

Method 2 - Using an Object Tag:


We recommend this solution for interactive animations starting “On scroll into view”, “On click”,  but also for animations starting “On mouse over”.

  1. In the Export panel, make sure you select “JavaScript” as the animation type, and let the animation start when you please (“On click”, “On scroll into view”, “On mouse over”). Click the “Export” button:
Export JavaScript as the animation type in SVGator
Export JavaScript as the animation type

2. Upload the SVG file to Webflow, in the “Assets” section:

Upload the SVG animation to Webflow from Assets section
Upload the SVG file to Webflow

3. Copy the asset link of the SVG by clicking on the cogwheel icon on the SVG’s  thumbnail and selecting the icon seen below:

Copy the svg asset linkon the cogwheel icon
Copy the asset link of the SVG

4. Navigate to “Code Embed” from the Advanced section (Please note that this feature is exclusively available for paying users):

Select Code Embed from the Advanced Webflow section
Select Code Embed from the Advanced section

5. In the "Code Embed Editor" section, add the asset link of your SVG by setting an object tag as shown in the example below. Paste the SVG asset link (previously copied) between the quotation marks, and then click on "Save & Close".

<object data="paste_the_svg_link_here"></object>

Add the asset link of the SVG in Code Embed Editor setting an object tag
Add the asset link of the SVG in Code Embed Editor

6. The animation won’t display until you hit the “Publish” button:

Publish the added SVG asset on Webflow
Publish the changes 


Discover more articles on SVG implementation:

How to Add Animated SVG to Your Website | SVGator Help
You can use an <img> or an <object> tag, or you can simply place the SVG code on your site. If it’s an interactive SVG, you should use the <object> tag.
How to Add Animated SVG to WordPress? | SVGator Help
Download SVGator’s plugin for WordPress and add stunning SVG animations to your website right away! Import your projects to your Media Library. Try Now!
How to Add Animated SVG to React Native | SVGator Help
React Native is great for building mobile apps, especially if you are already familiar with React. Now you can make it even better with animated SVG files.
How to Add Animated SVG to Squarespace | SVGator Help
You can use SVG animation on Squarespace if you are a Business or Commerce user. Add a new code block and copy the entire SVG code into the html block.