Pricing & alternatives
Open-source and self-hosted alternatives to Formspree
By the FormToMail team · Checked against official sources · Updated
You can replace Formspree with your own form handler: a Cloudflare Worker or Pages Function, a Vercel/Netlify function or a small server that validates the POST, checks spam (honeypot, Turnstile), sends an email through a provider's API and stores the submission. It costs little to run but you maintain the spam filtering, email deliverability and storage yourself.
| Self-hosted handler | Hosted form backend | |
|---|---|---|
| Setup | Write a function, set up an email provider and sending domain | Paste one URL |
| Spam | You add honeypot, Turnstile, rate limits | Included |
| Deliverability | Your SPF/DKIM/DMARC | The provider's |
| Dashboard / export | Build it or use a database UI | Included |
| Cost | Hosting free tiers + email API | Free tier, then a plan |
Minimum a self-hosted handler needs
- Accept
POSTwith form-encoded and JSON bodies; answerOPTIONSif you call it withfetch()from another origin (CORS). - Reject a filled honeypot field and verify a Turnstile token server-side.
- Rate-limit per IP so nobody turns it into a spam relay.
- Send the email through an email API with Reply-To set to the visitor.
- Store the submission (Cloudflare D1, Postgres) so a failed email isn't a lost lead.
When it's worth it
Self-host when you already run serverless code and want data in your own database. If you just need the form to work, a hosted endpoint is faster: create one free.
Quick answers
Can I self-host a form backend?
Yes, with a serverless function plus an email API. See Cloudflare Pages forms for the Cloudflare version.
Should I build my own form handler or use a service?
Build it if you want control and will maintain spam filtering; use a service if you want it working today.
How do I send email from a serverless function for a contact form?
Call an email provider's HTTPS API from the function with a server-side key; never put that key in browser code.
What to do next
Rather not maintain it? A FormToMail endpoint does the same job with nothing to host.
Create a free endpointSources
- Cloudflare Docs: Pages tutorial, create a HTML form
- Cloudflare Docs: Turnstile server-side validation
- Cloudflare Docs: D1
- Vercel Docs: Functions
- MDN: Cross-Origin Resource Sharing (CORS)
Checked: . Prices, limits and features of other services change: confirm current values at the official links above. Product names belong to their owners; we are not affiliated with them.