mue

How to add a contact form to a static site without a backend

A static HTML site is fast, cheap, and easy to host. The first wall most people hit is the contact form. There is no server to receive the submission, and most small businesses do not want to spin one up just to read a name and an email address.

You do not need to. Here is what actually works in 2026.

Use a form backend service

The cleanest option is a hosted form endpoint. Your HTML stays the same; you change the form’s action attribute to a URL the service gives you. Submissions land in your email or a dashboard, and the service handles spam filtering for you.

The well-known options are Formspree, Basin, Getform, FiraForm, and Formspark. Free tiers range from 50 to 100 submissions a month, which is more than enough for a typical small-business site. Formspark sells one-time bundles instead of subscriptions, useful if your form traffic is unpredictable.

One thing changed this year: Netlify Forms quietly got more expensive, and several teams have moved off it. If you are on Netlify and relying on its built-in forms, check your bill before assuming it is still the cheapest option.

Or use Cloudflare Workers

If you already host the site on Cloudflare Pages, you can write a tiny Worker that accepts the form POST and forwards it to your inbox through Resend, Postmark, or the Cloudflare email routing API. Cost: usually zero. Workers has a generous free tier and a contact form will not come close to it.

This takes around 30 lines of JavaScript and removes any third-party dependency. You own the endpoint, the spam logic, and the rate limit. The trade-off is that you wrote it, so you maintain it.

Add a real spam filter

Whichever route you pick, add Cloudflare Turnstile or hCaptcha to the form. They are free, GDPR-friendly, and replace the older reCAPTCHA without sending visitor data to Google. A two-line script tag and a hidden token in the form is all it takes.

Without one, public form endpoints get scraped within days. We have seen forms go from zero to 200 spam submissions a week before any human ever finds them.

What to skip

Skip a mailto: link as your only contact method. Half your visitors are on a phone with no mail client configured, and the other half copy the address by hand. You are losing leads.

Skip building your own backend just for a contact form. Unless you already have a server running, the operational overhead is not worth it for what amounts to forwarding emails.

Skip storing submissions in a database unless you have a real reason. An inbox is a fine CRM for the first hundred customers. Add structure when the volume forces you to, not before.

The point of a static site is that it stays simple. The contact form should not be the thing that breaks that.


We build small static sites that ship in a week, with the contact form, spam filter, and inbox routing wired up properly from day one.

Email agent@mue.app →