On this page
You've built a beautiful static website — plain HTML, maybe hosted on GitHub Pages, Netlify, Vercel or Cloudflare Pages. Then you add a contact form, press Submit, and… nothing useful happens. There's no server to receive the data.
The good news: you don't need to build a backend. This guide covers every realistic option, what each one is good for, and the fastest way to get a form working today.
Why a form needs "something" to receive it
An HTML form only sends data. When someone clicks Submit, the browser makes an HTTP request to the URL in the form's action attribute. Some program at that URL must receive the request, do something with the data — email it, store it — and send a response back.
Static hosting serves files; it doesn't run your code on each request. So "without a backend" really means "without a backend that I have to build and run". Someone else's backend does the work.
Option 1: mailto: (don't)
<form action="mailto:you@example.com" method="POST" enctype="text/plain">
This looks like a shortcut but fails most visitors. It tries to open a desktop email program. On phones and web-mail users, it either does nothing or opens a half-filled draft that people abandon. You get no spam protection, no records and no confirmation. Avoid it.
Option 2: Embed Google Forms (or a similar builder)
Quick and free, and responses land in a spreadsheet. The trade-offs: an iframe that doesn't match your design, limited styling, and visitors can see they've left your site's look and feel. Fine for internal surveys, less good for a professional contact form.
Option 3: Your host's built-in forms
Some hosts can capture forms deployed with your site (for example, Netlify Forms). It's convenient if you'll stay on that host, but it ties your forms to that platform, and moving hosts means rebuilding them. We compare these in How to Handle Forms on Static Websites.
Option 4: A form backend API (recommended)
A form backend service gives you a URL to put in your form's action. It receives submissions, filters spam, emails you, stores everything in a dashboard and can forward data to other tools. Your HTML stays 100% yours, and it works on any host.
Here's a complete working form using Formclick:
<form action="https://api.formclick.io/submit" method="POST">
<!-- 1. Your access key (from your Formclick dashboard) -->
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
<!-- 2. Optional settings -->
<input type="hidden" name="subject" value="New message from my website">
<input type="hidden" name="redirect" value="https://yourwebsite.com/thanks.html">
<!-- 3. Honeypot spam trap — keep it hidden -->
<input type="checkbox" name="botcheck" style="display: none;">
<!-- 4. Your fields — any name works -->
<label for="name">Name</label>
<input id="name" name="name" required>
<label for="email">Email</label>
<input id="email" name="email" type="email" required>
<label for="message">Message</label>
<textarea id="message" name="message" required></textarea>
<button type="submit">Send</button>
</form>
Setting it up in two minutes
- Create a free Formclick account — no credit card needed.
- Create a form and copy its access key.
- Paste the key into the hidden
access_keyfield. - Publish your page and send a test submission.
That's it. Every submission is emailed to you and stored in your dashboard. The Free plan includes 250 submissions a month and unlimited forms.
Staying on the page (AJAX)
The form above does a normal page submit and redirect, which needs zero JavaScript. If you'd rather show a success message without leaving the page, add one script tag:
<script src="https://cdn.formclick.io/formclick.min.js"></script>
Or write your own with fetch() — the endpoint returns JSON:
const form = document.querySelector('form');
form.addEventListener('submit', async function (event) {
event.preventDefault();
const response = await fetch(form.action, {
method: 'POST',
headers: { Accept: 'application/json' },
body: new FormData(form),
});
const result = await response.json();
form.innerHTML = result.success
? '<p>Thanks! We\'ll be in touch soon.</p>'
: '<p>Sorry, something went wrong. Please try again.</p>';
});
More detail in How to Submit HTML Forms Using the Fetch API.
Is it safe to put the access key in my HTML?
Yes. A Formclick access key can only send submissions to that one form. It can't read submissions, change settings or access your account. Spam filtering, the honeypot and rate limits protect the form, and on paid plans you can restrict it to your own domains or add a CAPTCHA.
Comparing the options
| Option | Your design | Any host | Spam protection | Setup |
|---|---|---|---|---|
| mailto: | Yes | Yes | No | Unreliable |
| Google Forms embed | No | Yes | Basic | Minutes |
| Host's built-in forms | Yes | No | Yes | Minutes |
| Form backend API | Yes | Yes | Yes | Minutes |
| Build your own server | Yes | — | You build it | Days |
What next?
- Choose a provider: Best HTML Form Backend Services in 2026
- Get submissions into your inbox: How to Send HTML Form Data to Email
- Start from a design: free HTML form templates



