How to Add a Contact Form to a Static Site (No Server Required)
Static sites are fast, secure, and cheap to host. But they have one obvious gap: they can’t process form submissions. There’s no server to receive a POST request, validate fields, or send a notification email.
If you want a contact form on your static site, you need somewhere to send the data.
What a form backend does
A form backend service gives you an endpoint URL. You set that URL as your HTML form’s action attribute. When someone submits the form, the service receives the data, stores it, and forwards it to you (usually via email or a dashboard).
No server code. No infrastructure. You write HTML and the form just works.
Step-by-step: adding a contact form with staticq
Here’s how to get a working contact form on your static site in about 3 minutes.
1. Create a staticq account
Sign up at staticq.app. The free tier gives you 5 forms and 100 submissions per month — more than enough for a personal site or small business.
2. Create a form in the dashboard
After signing in, click “New Form” and give it a name (e.g., “Contact Form”). staticq generates a unique slug for your form. This slug is part of the endpoint URL where submissions are sent.
3. Add the HTML form to your site
Drop this form into any page on your static site. Replace your-form-slug with the slug from your dashboard:
<form action="https://api.staticq.app/q/your-form-slug" method="POST">
<label for="name">Name</label>
<input type="text" id="name" name="name" required />
<label for="email">Email</label>
<input type="email" id="email" name="email" required />
<label for="message">Message</label>
<textarea id="message" name="message" required></textarea>
<button type="submit">Send Message</button>
</form>
That’s a complete, working form. Every field with a name attribute gets captured as a submission field.
4. Test it
Open the page in your browser, fill in the fields, and submit. Check your staticq dashboard — the submission should appear within seconds.
Optional enhancements
The basic form works immediately, but you can improve the experience.
Custom redirect URL
By default, submitters see a generic confirmation page. To redirect them back to your site after submission, add a hidden field:
<input type="hidden" name="_redirect" value="https://yoursite.com/thank-you" />
Or set the redirect URL in your form settings in the dashboard.
Email notifications
Enable email notifications in the dashboard to get an email every time someone submits your form. Each email includes all the submitted fields so you can reply directly.
Spam protection
staticq includes built-in spam protection. For extra filtering, add a honeypot field — a hidden input that real users won’t fill in but bots will:
<input type="text" name="_honeypot" style="display: none" tabindex="-1" autocomplete="off" />
Submissions with a filled honeypot field are silently discarded.
Multiple forms
Need a different form for job applications, feedback, or newsletter signups? Create additional forms in the dashboard. Each gets its own slug and endpoint.
Works with any static site
This approach works regardless of how you build or host your site:
- HTML files on GitHub Pages, Netlify, Vercel, or Cloudflare Pages
- Static site generators like Hugo, Eleventy, Jekyll, or Astro
- Website builders like Squarespace or Webflow (use the custom code embed)
The form is plain HTML. If your site can serve an HTML page, it can have a working contact form.
What you get on the free tier
- 5 forms
- 100 submissions per month
- Email notifications
- Spam protection
- Submission dashboard
No credit card required. If you outgrow the free tier, paid plans start at $9/month with higher limits and additional features like webhooks and priority support.
For framework-specific instructions, see our integration guides. Check out staticq pricing for current plan details.
Static sites don’t need to be form-less. Point your action attribute at a form backend, and you have a working contact form in minutes — no server, no functions, no complexity.