Static sites

Static forms, without the backend

A static form is just HTML pointed at the right endpoint. No server, no serverless function, no database, no plugin — your static site doesn't need to seek anything else to start collecting submissions.

"Static" describes how a site is served, not what it can do. A static site is just files — HTML, CSS, JS — delivered straight from a CDN with no server rendering anything on the fly. Forms are the one piece that historically needed a server, which is why so many static sites either skip forms entirely or drag in far more infrastructure than the job requires.

Static forms close that gap without breaking the static model. The HTML <form> element can post to any URL on the internet, not just a script hosted alongside your pages. onsubmit.dev supplies that URL. Your form's action attribute points at it, the visitor's browser delivers the submission, and we handle validation, spam filtering, storage, and notification — all off your site's infrastructure.

The result is an implementation so simple it barely feels like "integrating" anything: no SDK to import, no build configuration, no API key to hide, no code beyond the markup you'd write anyway. One attribute, and the form works — on day one and every day after.

How to build a static form

Three steps, one attribute, live in minutes.

Step 01

Write a plain HTML form

Static forms start as ordinary markup — no JavaScript framework, no form-builder SDK, no npm package. The <form> tag your browser has understood for thirty years is the entire building block you need.

Drop it into a hand-written page, a Hugo template, an Astro component, or any static site generator's layout — the markup is identical everywhere.

html
<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" required></textarea>
  <button type="submit">Send</button>
</form>
Step 02

Point the action attribute at your endpoint

Create a free form on onsubmit.dev and copy the endpoint URL into the action attribute. That single attribute is the whole integration — nothing to install, deploy, configure, or maintain.

The browser handles the POST natively, so the form keeps working even with JavaScript disabled, and your site stays exactly as static as it was.

02
Step 03

Publish — the static site needs nothing else

Deploy your files to any static host: GitHub Pages, Cloudflare Pages, Netlify, S3, wherever. There's no environment variable to set, no function to deploy alongside it, no database to provision.

onsubmit.dev receives the submission, filters spam, stores it, and emails it to you. Your site's only job stays serving plain files.

03

Why static forms are this easy

Everything a form needs beyond markup is handled off your site — it just serves HTML.

One attribute, minutes to launch

There's no configuration file, no build step, no account-linking dance. Paste a URL into an action attribute and your static form works.

No backend to seek out

A static form doesn't go looking for a server, a serverless function, or a database. Everything the form needs lives at the endpoint it already points to.

Works with any static site generator

Hugo, Jekyll, Eleventy, Astro, Gatsby, Next.js static export, or a folder of hand-written HTML — the same form markup works unchanged in all of them.

Spam handled before it reaches you

Honeypot fields and keyword filters silently drop bot submissions. Blocked spam never counts against your plan quota.

Every submission delivered instantly

Messages land in your inbox within seconds, with optional mirrors to Slack, Telegram, Discord, Google Sheets, Notion, and Airtable.

Free tier that stays free

50 messages a month with no credit card — enough for a portfolio, docs site, or small business page to run indefinitely.

Your static site shouldn't have to seek anything else

The instinct when a static site "needs a form" is to reach for something bigger: a serverless function, a hosted backend, a CMS migration, or a heavyweight framework rewrite. Each of those solves the form problem by giving up the thing that made the site static in the first place — no servers to run, no infrastructure to patch, no build pipeline beyond generating files.

A static form doesn't need any of that. It only needs somewhere to send its POST request, and that "somewhere" can live entirely outside your project. onsubmit.dev is that somewhere: the only piece of the system that ever needed a server is the piece that runs on ours, not yours.

That keeps your static site exactly as static as it was before you added a form — same hosting, same deploy process, same Lighthouse scores, same zero-maintenance footprint. It doesn't seek out a database, a cron job, an API key rotation, or a security patch schedule. It just serves files, and one of those files happens to contain a form that works.

It scales with you, not against you

Because the base integration is a plain action attribute, it works with JavaScript disabled — the most durable submission path available. If you later want inline success states instead of a redirect, layer a small fetch() call on top of the same form. The endpoint doesn't change, the no-JS fallback stays intact, and the site stays static throughout.

Works with every static site generator

The setup is identical everywhere — one attribute — and we have step-by-step guides for the tools you use.

Frequently asked questions

What are static forms?

Static forms are HTML forms on a static site — a site with no server-side code — that still successfully collect and deliver submissions. The form's action attribute points to a hosted endpoint instead of a script on your own server, so the form works without your site running any backend.

How do I add a form to a static site?

Write a normal HTML <form>, set its action to your onsubmit.dev endpoint, and set method to POST. Publish the page. That's the entire setup — no server, plugin, or JavaScript required.

Does a static form require a backend or serverless function?

No. The browser posts the form data directly to onsubmit.dev, so your site never needs a backend, serverless function, or database of its own. It stays 100% static.

Is the setup really just one attribute?

Yes. Create a free form in the dashboard, copy its endpoint URL, and paste it into your form's action attribute. There is nothing else to install or configure.

Will static forms attract spam?

Public forms do get targeted by bots, which is why every submission passes through honeypot fields and keyword filtering before it reaches you. Blocked spam is discarded silently and doesn't count against your quota.

Do static forms work with JavaScript disabled?

Yes. Because the integration is a plain form action, the browser submits it natively without any JavaScript. That makes it the most resilient way to collect submissions from a static site.

Add a static form to your site today

Free forever for up to 50 messages a month. One attribute, no backend, no credit card.