Every website needs a way for visitors to get in touch, but a plain HTML form does nothing on its own: browsers can collect input, but something has to receive it. Building an HTML contact form without a backend used to mean writing server code, but today free form-handling services accept your submissions with nothing more than a form tag and an action URL. This guide shows you how to build an HTML contact form without a backend in four easy ways, with complete copy-paste code, spam protection tips, and a comparison to help you pick the right service.
In This Guide
- Why an HTML Form Needs a Backend (and How to Skip It)
- First: Write Good Form Markup
- Way 1: Formspree (Simplest for Any Static Site)
- Way 2: FormSubmit (Zero Signup Required)
- Way 3: Netlify Forms (Best if You Host on Netlify)
- Way 4: Google Forms Embed (Quickest Internal Form)
- Comparing the 4 Options
- Spam Protection: Honeypots and reCAPTCHA
- Frequently Asked Questions
- Key Takeaways
Why an HTML Form Needs a Backend (and How to Skip It)
When a visitor clicks Submit, the browser packages the form fields and sends an HTTP request to the URL in the form’s action attribute. On a traditional site, that URL points to your own server script, which validates the data and emails it to you. A static site has no server script, so the submission goes nowhere.
Form-backend services solve this by giving you their endpoint as your action URL. Your HTML stays 100% static; their servers receive the submission, filter spam, and forward it to your email or dashboard. You get a working contact form with zero server code, zero maintenance, and usually a generous free tier. If you have not put your site online yet, our guide to hosting a static website for free pairs perfectly with this one.
First: Write Good Form Markup

Whichever service you choose, start with accessible, valid form HTML. Every input needs a label, a name attribute (that is what the service receives), and appropriate types so mobile browsers show the right keyboards:
<form action="YOUR-ENDPOINT-HERE" method="POST">
<label for="name">Name</label>
<input type="text" id="name" name="name" required autocomplete="name">
<label for="email">Email</label>
<input type="email" id="email" name="email" required autocomplete="email">
<label for="message">Message</label>
<textarea id="message" name="message" rows="5" required></textarea>
<button type="submit">Send Message</button>
</form>
The required attributes give you free client-side validation, type="email" checks the format, and autocomplete helps users fill the form faster. The MDN tutorial on your first HTML form is the authoritative reference for form fundamentals.
Way 1: Formspree (Simplest for Any Static Site)
Formspree is the most popular backend-free option: sign up, create a form, and paste the endpoint it gives you into your action attribute.
Setup Steps
1. Create a free account and add a new form; Formspree gives you an endpoint like https://formspree.io/f/your-form-id.
2. Set your form’s action to that endpoint with method="POST".
3. Submit the form once yourself; Formspree sends a confirmation email to verify you own the address.
4. From then on, every submission lands in your inbox and your Formspree dashboard.
<form action="https://formspree.io/f/your-form-id" method="POST">
<label>Name <input type="text" name="name" required></label>
<label>Email <input type="email" name="email" required></label>
<label>Message <textarea name="message" required></textarea></label>
<button type="submit">Send</button>
</form>
Pros and Limits
Works on any host, includes spam filtering and a submissions dashboard, and supports AJAX submissions for no-page-reload forms. The free tier caps monthly submissions (enough for personal sites and small businesses), and advanced features like custom redirects need a paid plan.
Way 2: FormSubmit (Zero Signup Required)
FormSubmit is remarkable: no account at all. Point your form at their endpoint with your email address in the URL, submit once, and confirm ownership via the activation email they send.
<form action="https://formsubmit.co/[email protected]" method="POST">
<input type="text" name="name" placeholder="Your name" required>
<input type="email" name="email" placeholder="Your email" required>
<textarea name="message" placeholder="Your message" required></textarea>
<!-- extras: custom subject, thank-you page, no captcha -->
<input type="hidden" name="_subject" value="New message from my site">
<input type="hidden" name="_next" value="https://yoursite.com/thanks.html">
<input type="hidden" name="_captcha" value="false">
<button type="submit">Send</button>
</form>
Hidden fields unlock useful behavior: _subject customizes the email subject, _next redirects to your own thank-you page, and _captcha toggles their captcha. There is also an AJAX endpoint variant if you want to handle submissions with JavaScript fetch() instead of a page reload.
Pros and Limits
Completely free with no account to manage, which makes it ideal for quick projects and prototypes. The trade-off is fewer dashboard features and deliverability that depends on a shared service; for a business-critical contact form, a service with an account and dashboard gives you more control.
Way 3: Netlify Forms (Best if You Host on Netlify)
If your static site is deployed on Netlify, its built-in form handling is the smoothest option: no third-party signup beyond the Netlify account you already have.
Setup Steps
1. Add data-netlify="true" to your form and give the form a name.
2. Deploy the site. Netlify’s build bots detect the attribute and register the form automatically.
3. Submissions appear in your Netlify dashboard under Forms, with email notifications configurable.
<form name="contact" method="POST" data-netlify="true">
<label>Name <input type="text" name="name" required></label>
<label>Email <input type="email" name="email" required></label>
<label>Message <textarea name="message" required></textarea></label>
<button type="submit">Send</button>
</form>
Add data-netlify-honeypot="bot-field" plus a hidden input named bot-field for built-in spam trapping. Netlify also supports reCAPTCHA integration and file uploads on higher tiers.
Pros and Limits
Zero extra services, submissions live alongside your deploys, and spam filtering is built in. The catch: it only works for sites actually hosted on Netlify, and the free tier includes 100 submissions per month, plenty for most small sites.
Way 4: Google Forms Embed (Quickest Internal Form)
For internal tools, event signups, or surveys where design polish matters less, a Google Form embedded in an iframe takes about two minutes: create the form, click Send, copy the embed code, and paste it into your page. Responses collect in a Google Sheet automatically, which is genuinely useful for registrations and feedback.
The downside is branding: visitors clearly see a Google Form, styling options are limited, and it feels less professional on a business contact page. Use it where function beats form, not as your main “contact us” experience.
Comparing the 4 Options
| Formspree | FormSubmit | Netlify Forms | Google Forms | |
|---|---|---|---|---|
| Signup needed | Yes | No | Netlify account | Google account |
| Works on any host | Yes | Yes | Netlify only | Yes (embed) |
| Free tier | Generous monthly cap | Unlimited, free | 100/month | Free |
| Custom styling | Full control | Full control | Full control | Limited |
| Best for | Professional static sites | Quick prototypes | Netlify-hosted sites | Internal forms, surveys |
Spam Protection: Honeypots and reCAPTCHA
A public form endpoint attracts bots within days. Two defenses cover nearly everything:
The Honeypot Field
Add a text input hidden with CSS that humans never see. Bots fill every field; humans leave it blank. Reject any submission where it has a value:
<!-- visible to bots, hidden from humans -->
<input type="text" name="company" class="hp-field" tabindex="-1" autocomplete="off">
.hp-field {
position: absolute;
left: -9999px;
opacity: 0;
height: 0;
}
Never use display: none for honeypots; smarter bots skip those. Off-screen positioning looks like a real field to a bot but is invisible and unreachable to keyboard users thanks to tabindex="-1".
reCAPTCHA and Alternatives
Formspree and Netlify both support reCAPTCHA integration for stronger protection. Only add it if honeypots prove insufficient, because captchas measurably reduce legitimate submissions. Also confirm your form page itself loads over HTTPS so submissions travel encrypted; our beginner guide explains how HTTPS works and why it matters for forms.
Frequently Asked Questions
Can I really have a contact form with no backend at all?
Yes. Form-backend services receive the submission at their endpoint, so your site stays 100% static HTML. You write no server code and maintain no server.
Which free option is best for a portfolio site?
Formspree or Netlify Forms (if you host on Netlify). Both give you a dashboard, spam filtering, and email notifications, which matter more than FormSubmit’s zero-signup convenience once the site represents you professionally.
How do I redirect to a thank-you page after submission?
FormSubmit uses a hidden _next field with your thank-you URL. Formspree supports redirect configuration in its dashboard. Netlify Forms uses an action="/thanks/" attribute on the form.
Can I submit the form without reloading the page?
Yes. All three HTML-endpoint services accept fetch() POST requests. Send a FormData object to the same endpoint and handle the response in JavaScript for a smooth no-reload experience.
Will these forms work with file uploads?
Formspree and Netlify support file uploads on paid tiers. For a free contact form, skip attachments; ask visitors to include links instead.
Is it safe to expose my email in the form action URL?
FormSubmit puts your address in the endpoint URL, which bots can harvest from your page source. Use their AJAX endpoint or an aliased address if spam is a concern, or prefer Formspree/Netlify where the endpoint contains an ID instead of your address.
Key Takeaways
- An HTML contact form without a backend works by pointing the form’s
actionat a form-handling service’s endpoint. - Formspree is the best all-round choice for professional static sites on any host.
- FormSubmit needs no signup and is perfect for prototypes and quick projects.
- Netlify Forms is the smoothest option if your site is already hosted on Netlify.
- Google Forms embeds are fastest for internal forms and surveys where branding does not matter.
- Always add a honeypot field, validate with HTML attributes, and serve the page over HTTPS.
Conclusion
Building an HTML contact form without a backend is one of the best beginner wins in web development: a few lines of HTML plus a free service endpoint, and your static site has a working inbox. Start with good markup, pick the service that matches your hosting, add a honeypot against spam, and test the full flow yourself before announcing it. Once your form is live and your site is deployed, often via our step-by-step GitHub Pages guide, you have a complete, professional web presence with zero server code. And when you are ready to make that form feel more alive, read our guide on adding a dark mode toggle with JavaScript for your next interactive upgrade.