Static website form submission, without a backend
Static sites are fast, cheap, and secure — but they have no server to catch a form. Point your HTML form at an onsubmit.dev endpoint and collect every contact message, signup, and lead without deploying a single line of backend code.
A static website is a set of pre-built HTML, CSS, and JavaScript files served directly from a CDN or file host. There is no application server running behind it, which is exactly what makes static sites so fast to load, cheap to host, and hard to hack. The trade-off is that a traditional form needs a server-side script to receive its data — a PHP handler, a Node route, or a serverless function — and a static site, by definition, does not have one.
This is the problem static website form submission tools solve. The HTML <form> element can post to any URL on the web, not just a page on your own domain. So instead of standing up a backend just to catch a contact form, you point the form's action at a hosted endpoint that receives, validates, and stores the submission for you. Your site stays 100% static; the form-handling infrastructure lives somewhere else and is maintained for you.
With onsubmit.dev, that endpoint takes about a minute to set up. You create a form, copy its endpoint URL, and paste it into the actionattribute of any HTML form. When a visitor submits, the browser sends a normal POST request to our servers, we filter out spam, save the entry, email it to you, and — if you like — forward it to Slack, Telegram, a webhook, or a spreadsheet. No servers to run, no databases to manage, no dependencies to keep up to date.
How to collect form submissions on a static site
Three steps, no backend, live in minutes.
Write a plain HTML form
A static website has no server to receive a POST request, but the HTML <form> element does not need one to exist. Write your form exactly as you would on any page — inputs, labels, and a submit button — and let onsubmit.dev be the destination it posts to.
No JavaScript framework, no build step, and no third-party widget are required. If your static site generator can output HTML, it can collect form submissions.
<form action="https://onsubmit.dev/f/your-form-id" method="POST">
<input name="name" placeholder="Your name" required />
<input name="email" type="email" placeholder="Email" required />
<textarea name="message" placeholder="Message" required></textarea>
<button type="submit">Send</button>
</form>Point the action at your endpoint
Set the form's action attribute to your onsubmit.dev endpoint URL. That single attribute is the whole integration — there is no serverless function to deploy, no API route to write, and no database to provision. The browser handles the POST natively.
Because the browser submits the form directly, this works even with JavaScript disabled — the most robust way to handle static website form submission.
Receive every submission instantly
The moment a visitor submits, the entry is validated, spam-filtered, stored, and delivered to your inbox. From there you can fan it out to Slack, Telegram, Discord, a webhook, Google Sheets, Notion, or Airtable — without adding a line of backend code to your static site.
Submissions appear in your dashboard within seconds, and email notifications arrive just as fast so you never miss an enquiry.
Why route static form submissions through onsubmit.dev
Keep your site static and let us handle everything the form touches.
No backend to build or host
Static sites are fast and cheap precisely because they have no server. onsubmit.dev keeps it that way — we are the backend your form posts to, so you keep deploying plain HTML.
Works with any static host
GitHub Pages, Cloudflare Pages, Netlify, Vercel, Amazon S3, or a plain nginx box — if it serves HTML, your form submissions work without changing your hosting.
Spam filtered out of the box
Honeypot fields and keyword filters silently drop bots before they reach you, and blocked spam never counts against your quota. Add your own hidden field for extra protection.
Instant notifications
Every submission is emailed to you and can be pushed to Slack, Discord, Telegram, or any webhook, so your team responds while the enquiry is still fresh.
Route data anywhere
Forward each submission to Google Sheets, Notion, Airtable, a CRM, Zapier, or n8n. Your static site becomes a data pipeline without a single serverless function.
Works without JavaScript
The native browser POST means your form still submits if scripts fail to load — the most resilient approach to static website form submission there is.
Why static sites can't handle forms on their own
When you submit a form on a dynamic website, the browser sends the field values to a program running on a server. That program reads the data, maybe writes it to a database, sends an email, and returns a response. Static hosts like GitHub Pages, Cloudflare Pages, Amazon S3, and Netlify's CDN don't run programs — they only serve files. There is nothing on the other end to execute that logic, so a form posting to a static site simply has nowhere to go.
Developers have historically worked around this in three ways: writing a small serverless function, embedding a heavy third-party form widget, or relaying submissions through mailto: links that depend on the visitor's email client. Each adds friction — a function is more code and infrastructure to maintain, widgets are slow and clash with your design, and mailto: links are unreliable and expose your address to scrapers.
A dedicated form endpoint removes all three problems at once. Your form posts to a URL we host, so there is no function to write, no widget to load, and no email client to depend on. You keep full control of your markup and styling — onsubmit.dev never injects anything into your page — while we take care of receiving, validating, filtering, storing, and forwarding every submission.
Progressive enhancement, done right
Because the integration is a plain action attribute, your form works with JavaScript switched off. That makes it the most resilient option for static website form submission: even if a script fails to load or a browser blocks it, the native POST still delivers the submission. When you do want a smoother experience, you can progressively enhance the same form with a fetch() call for inline success messages — without changing the endpoint or losing the no-JS fallback.
Guides for every static site generator
The setup is the same everywhere, and we have step-by-step guides for the tools you use.
Frequently asked questions
How do I handle form submissions on a static website?
Point your HTML form's action attribute at an onsubmit.dev endpoint and set the method to POST. The browser submits the form directly to our servers, which validate, store, and deliver the data to you. Your static site never needs a backend, database, or serverless function.
Can a static site really accept form submissions without a server?
Yes. The <form> element posts to any URL you choose, so the server that receives the submission does not have to be the one hosting your pages. onsubmit.dev provides that receiving endpoint, letting a fully static site collect contact messages, signups, and leads.
Does it work with Hugo, Jekyll, Eleventy, Astro, and Gatsby?
Yes. Any static site generator that outputs HTML works, because the integration is just an action attribute on a standard form. We publish dedicated guides for Hugo, Jekyll, Eleventy, Astro, Gatsby, Next.js, GitHub Pages, and Cloudflare Pages.
How is spam handled on a static form?
Built-in honeypot fields and keyword filters silently discard bot submissions before they reach your inbox, and blocked spam never counts toward your plan limit. You can also add your own hidden honeypot field for an extra layer.
Where can visitors be sent after submitting?
You can redirect visitors to your own thank-you page after a successful submission, or use the default confirmation page. Configure the redirect URL per form from your dashboard.
Is it free to collect static website form submissions?
Yes. The free tier handles up to 50 submissions a month with no credit card required, which is plenty for most personal sites, portfolios, and small landing pages. Paid plans add higher limits and more integrations.
Add a form to your static site today
Free forever for up to 50 submissions a month. No backend, no credit card.
