Guide
HTML form without a backend.
Build a working contact form with zero server-side code. No PHP, no Node.js, no database. Just HTML and a form backend endpoint.
1. Create a static form backend
A static form backend is a hosted API that receives your form data and forwards it to email or integrations. Sign up for FormsFort (free, no credit card), create a form, and copy your public access key.
This key is safe to embed in HTML. It only works from domains you authorize.
2. Write the HTML form markup
Create a standard <form> element. Set the action to your form backend endpoint and method to POST.
Add fields for name, email, and message.
<form action="https://api.formsfort.com/submit" method="POST">
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
<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" rows="5" required></textarea>
<button type="submit">Send</button>
</form>
The access_key tells the backend which form inbox to deliver to.
The required attribute enables browser-side validation before the form is even submitted.
3. Add spam protection with a honeypot
Spam bots fill out every field they see. Add a hidden checkbox that real users won't touch. If the backend receives a submission with this field checked, it rejects it automatically.
<input type="checkbox" name="botcheck" style="display:none" /> For stronger protection, enable rate limiting and optional captcha in your form backend dashboard. No code changes are needed on your site.
4. Deploy to any static host
Because there is no server-side code, you can deploy this HTML file to any host:
- GitHub Pages
- Netlify
- Vercel
- Cloudflare Pages
- AWS S3 + CloudFront
- Traditional shared hosting
Simply upload the file or push to your Git repository. The form works the moment the page is live.
5. Test the submission
Open the page in a browser, fill out the fields, and click submit. Check the inbox configured in your form backend dashboard. You should see the submission within seconds.
If something goes wrong, open the browser's Network tab to inspect the POST request and response. Most issues are due to a missing access key or an unauthorized domain.
Advanced
More patterns for backend-free forms.
FAQ
Common questions about backend-free forms.
Can an HTML form work without a backend?
Yes. By pointing the form's action attribute to a third-party form backend API, the browser submits the data directly to that service. You do not need PHP, Node.js, or any server-side code on your own host.
Is it safe to put a form backend URL in HTML?
Yes, as long as the access key is public by design and the backend validates the requesting domain. FormsFort verifies email recipients and supports domain restrictions to prevent abuse.
What hosts work with HTML forms without a backend?
Any host that serves HTML works. This includes GitHub Pages, Netlify, Vercel, Cloudflare Pages, Surge, Render Static Sites, AWS S3, and traditional shared hosting.
How do I protect a form without server-side code?
Use a honeypot field hidden with CSS, enable rate limiting in your form backend dashboard, and optionally require a captcha token. These protections are handled by the backend, not your site.
Can I receive file uploads without a backend server?
Yes. Set the form enctype to multipart/form-data and add a file input. The form backend receives and stores the file. Your site never touches the upload.
Build your first backend-free form.
Create a form, get your access key, and receive submissions in under 5 minutes.
Get started free