HTML export

This tutorial shows how to export your Mosaic site as static HTML and keep its forms working.

You can turn your whole site into plain HTML files, with no PHP and no database behind it. You’ll export it as a zip to a folder on your server, or straight to Cloudflare, then fine-tune what goes into the export and connect your forms to a service that works without a server.

Choose a destination

Open the export

Open the menu on a theme’s card and choose Export as HTML.

Download a zip

Download zip is the default destination. Mosaic packs everything into a zip file that downloads when the export finishes. Inside, you’ll find all of the site’s assets plus your posts and pages as HTML files, ready to serve from any static host.

Send it to a server folder

To skip the download, choose Folder on this server and enter the exact path. Mosaic sends the files there.

Or publish to Cloudflare

Choose Cloudflare to upload your site straight to a Cloudflare Worker or a Pages project. The steps below use a Worker.

Publish to Cloudflare

Create a Worker

On the Cloudflare dashboard, create a new application. The Hello World template is fine, since Mosaic replaces it with your own files.

Name and deploy it

Rename the Worker, for example, to mosaic, and click Deploy.

Create an API token

Use the quick search in the top left to search for “token”, go to Account API tokens, and create a new token.

Set the permissions

Give the token a name, for example, Mosaic HTML export, and select Edit Cloudflare Workers for the permissions. Review the token, then click Create token.

Save your credentials

Copy your API token and your account ID and keep them somewhere safe. You’ll need both in the next step.

Connect Mosaic

Back in Mosaic, add your account ID, your API token, and the name of your Worker.

Run the export

Start the export and wait until it finishes. Then open the URL where your Worker serves the site. It’s live and works just like before.

Fine-tune the export

Add a base URL

If you already know your static site’s final address, enter it as the base URL. This gives you a sitemap, an RSS feed, social share images, and tags for search engines.

Choose what to include

Limit the export to just what you need. For example, select only pages if you don’t need anything else.

Pick a permalink structure

Choose between a folder for each page with an index.html file inside, or the page’s name as the HTML file.

Set a form fallback

A static site has no server or mail service behind it. When a form has an action, the visitor’s browser sends the submission straight to the receiving service. The Forms option here is only a fallback for forms without an action: it can redirect the visitor or send submissions to a service you configure. Ideally, you set up the action on each form instead.

Keep forms working

Add a form action

Select your form and add an action. Actions that need a server won’t work on a static site, so skip Email, Kit, Mailchimp, MailerLite, and Search. The rest work. This example uses Formspree.

Add the endpoint

Paste the endpoint of your Formspree form, then save your changes.

Test the form

Fill in the form on your exported site and submit it. Then open your form’s submissions in Formspree to check that it arrived.

Result

Your site now runs as plain HTML files, wherever you choose to host it. With a base URL set, it keeps its sitemap, RSS feed, and search engine tags, and with a server-free action like Formspree, your forms keep collecting submissions.

Last updated: December 1, 2026

Still have more questions? Let us help!

Your cookie preferences

We use cookies to improve your experience, analyze traffic, and personalize content. By clicking "Accept all" you agree to storing them on your device. Read our privacy policy.