Code export

Updated

Export your Webflow site’s HTML, CSS, JavaScript, and assets.

On paid Workspace plans, you can export your site’s HTML, CSS, JavaScript, and assets to back up your code, provide it to your client, or host it anywhere you like — no attribution required.

Note

Code export is only available on Workspace plans — that is, Site plans do not include the ability to export your site’s code.

How to export your code

  1. Open your site
  2. Go to Main menu > Code export, or press Shift + E
  3. Click Prepare ZIP 
  4. Download the ZIP file

Important

CMS, User Accounts, Ecommerce content (databases) and functionality, Logic flows, and localized pages, elements, and content aren’t included in exported code. On exported sites, Collection lists will show the empty state, and Collection pages won’t show any content that’s bound to Collection fields. Any password protected pages on your site will no longer be protected after code export. Additionally, site search and forms (including file upload and reCAPTCHA) will not work on exported sites in order to comply with GDPR. Learn more about collecting form submissions on exported sites.

How to export minified HTML

Minifying your HTML can help improve page load times by removing white space, comments, and other code elements browsers don’t need to load the page. To export minified HTML:

  1. Go to Main menu > Code export, or press Shift + E
  2. Press Control + O on your keyboard
  3. Check the Minify HTML checkbox that appears in the export window
  4. Click Prepare ZIP 
  5. Download the ZIP file

What your exported files include

The downloaded ZIP file contains all your site’s pages, styles, scripts, and images:

  • A CSS folder with all your site’s styles included in 3 .css files:
    • a CSS file (e.g., your-site-name.css) that contains all of your site’s custom styles
    • webflow.css which contains common base styles for the Webflow layout system, as well as all the components like navbars, sliders, and tabs
    • normalize.css which makes browsers render all elements more consistently and in line with modern standards. It precisely targets only the styles that need normalizing.
  • A JS folder which contains all the JavaScript files for your site. Elements and features like forms, navbars, sliders, tabs, and interactions rely on these files. If you delete these files, your page might look correct, but it won’t work as expected.
  • An images folder with all the images uploaded in your site’s Assets panel
  • .html files for all of your site’s pages (including empty Collection template pages)

Important

CMS, User Accounts, Ecommerce content (databases) and functionality, Logic flows, and localized pages, elements, and content aren’t included in exported code. On exported sites, Collection lists will show the empty state, and Collection pages won’t show any content that’s bound to Collection fields. Any password protected pages on your site will no longer be protected after code export. Additionally, site search and forms (including file upload and reCAPTCHA) will not work on exported sites in order to comply with GDPR. Learn more about collecting form submissions on exported sites.

Good to know

If you’d like to see a sample of the code Webflow exports, check out the source code of our homepage by right-clicking and choosing View page source. It’s all built in Webflow!

What your exported files don’t include

The following features and content are not included in exported code and will not function as expected on exported websites: 

  • CMS content and functionality (including Collection items and Collection lists)
  • User Accounts content and functionality (including users and access groups)
  • Ecommerce content and functionality (including products and checkout)
  • Site and/or page password protection
  • Form submission processing 
  • Pre-existing form submissions (can be exported separately)
  • reCAPTCHA elements within forms
  • Site search
  • Logic flows
  • Localized content (i.e., only your site’s primary locale’s pages, elements, and content are included)

Note

You can export CMS Collections (including localized Collection content), Ecommerce Collections, and User Accounts in CSV format to save a backup of your Collection items (including localized Collection items), user accounts, and products.

FAQ and troubleshooting tips

Why is there a “w-” prefix in front of class names?

Webflow prefixes component-specific classes with “w-” to avoid conflicts with other code frameworks. 

Can I choose to export only a part of my site’s code? 

At the moment, you can’t choose what gets exported. Every exportable part of your site will be included in each and every export. 

Can I edit the code after I export it? 

You can edit the code after exporting. Keep in mind, however, that manual changes to exported files may break some Webflow components. 

Can I remove the .html extensions from the URL of my exported pages? 

If you want to remove the .html extensions from your exported pages, you can do so with an .htaccess file

Do I need to provide attribution to Webflow if I host my site externally? 

After exporting, you don’t need to provide attribution to Webflow or maintain a Webflow plan for your exported site to work on your own server. 

Does the exported code include my CMS, Memberships, and Ecommerce content?

CMS, User Accounts, and Ecommerce content (databases) aren’t included in exported code. Collection lists will show the empty state, and Collection pages won’t show any content that’s bound to Collection fields. 

Does the exported code include my localized pages, elements, and content?

Localized pages, elements, and content aren’t included in exported code. Exported code only includes the primary locale.

Will password protected pages still be protected after I export my code? 

No. Any password protected pages on your site won’t be protected after code export. Your site must be hosted with Webflow in order for password protection to work as expected.

Will all elements function on my site if I host the code elsewhere? 

CMS, User Accounts, Ecommerce content (databases) and functionality, Logic flows, and localized pages, elements, and content aren’t included in exported code. These features require hosting to function as expected. On exported sites, Collection lists will show the empty state, and Collection pages won’t show any content that’s bound to Collection fields. Any password protected pages on your site will no longer be protected after code export. 

Additionally, site search and forms (including file upload and reCAPTCHA) will not work on exported sites in order to comply with GDPR. To collect form submissions, you’ll need to use a third-party tool or embed a third-party form integration. Learn more about collecting form submissions on exported sites.

Why don’t my Lottie animations work locally when I export my site?

For security reasons, Lottie JSON files won’t load from your local file system, so Lottie animations won’t appear when you load your site locally — they need a web server to work as expected.