splitforms.com

Static site contact form

Static site contact form, no backend.

A static site contact form is a plain HTML form on a site with no server — GitHub Pages, Netlify, Hugo, Astro — that needs somewhere to send submissions. splitforms does it for any static site on any host: point the form at one hosted endpoint and every submission lands in your inbox and dashboard, with no serverless function, PHP, or SMTP. Free covers 500 submissions a month with no card; Pro is $5/month for 5,000 a month.

  • 500 free / month
  • No serverless fn
  • 5 generators
A static HTML contact form submitting to the splitforms hosted backend

Key benefits

No backend code

No serverless function, Worker, PHP, or SMTP — the endpoint is the backend.

Spam filtered

Honeypot, time-trap, and rate limits screen bots before your inbox.

Inbox + dashboard

Accepted submissions are saved to your dashboard before owner notification email is attempted; delivery time and inbox placement depend on provider and recipient settings.

Copy-paste ready

Static site contact form code, ready to paste.

Drop this into any static template, point the action at the endpoint, and add your access key. That's the whole integration — no build step, serverless function, or SMTP.

contact.html
<form action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
  <input type="hidden" name="redirect" value="https://yoursite.com/thanks" />

  <label>Name <input name="name" autocomplete="name" required /></label>
  <label>Email <input name="email" type="email" autocomplete="email" required /></label>
  <label>Message <textarea name="message" required></textarea></label>
  <input type="checkbox" name="botcheck" style="display:none" tabindex="-1" />
  <button type="submit">Send message</button>
</form>

How to add it

How to add a contact form to a static site.

Five steps, no server code of your own — the same path works whether your site is pure HTML or a generator like Hugo or Astro.

Step 1 of 5

Create a free splitforms account and access key

Sign up and create a form in the dashboard. Free covers 500 submissions a month on unlimited forms, with email notifications and spam filtering included and no credit card required. Copy the form's access_key.

Step 2 of 5

Paste the HTML form into your static template

Add a plain <form action="https://splitforms.com/api/submit" method="POST"> to your GitHub Pages, Astro, Hugo, Eleventy, or Jekyll template — no build step, API route, or serverless function required.

Step 3 of 5

Add the access_key, redirect, and honeypot fields

Set access_key as a hidden field so splitforms knows which form is submitting, add a redirect field with your thank-you page URL, and include a hidden botcheck input that must stay empty to catch bots.

Step 4 of 5

Rebuild and deploy your static site

Push to GitHub Pages, Netlify, Cloudflare Pages, S3, or your host of choice. The form posts directly to splitforms, so there is nothing server-side to configure on the host itself.

Step 5 of 5

Send a test submission and check the dashboard

Submit the live form once. Confirm the lead lands in your inbox and the splitforms dashboard, then turn on allowed-domains or strict origin mode in the form's settings to block spoofed submissions from other sites.

You're all set ✓

How it works

Do you need a backend for a static site form? No.

Static hosts can't process POST requests themselves — they only serve files. splitforms sends the browser's POST straight to a hosted form endpoint built for that job, so nothing runs on your host: every submission is filtered, stored, and delivered to your inbox.

  • Plain HTML form POSTs straight to the endpoint — no serverless function
  • Every lead emailed to you and saved to a searchable dashboard
  • Same access_key + redirect fields wire into GitHub Pages, Astro, Hugo, Eleventy, and Jekyll
A static site form submission received, filtered, stored, and routed to your inbox

Spam protection

How do you stop spam on a static contact form? No CAPTCHA.

splitforms layers three defenses that all work on a purely static page — no CAPTCHA required. If your site can run one line of JavaScript, add a form_loaded_at hidden field as a time-trap, and optional reCAPTCHA v2 is available as an extra layer. Per-form allowed-domains or strict origin mode blocks other sites from reusing your access_key.

  • Hidden botcheck honeypot field that must stay empty
  • Server-side content heuristics on every submission automatically
  • Rate limiting: 6 submissions a minute, 20 per 15 minutes per IP
Spam defenses screening a static site contact form without a CAPTCHA

Optional fetch

Can a static contact form return JSON instead of a redirect?

Yes. An Astro island, an Eleventy page with a small script, or a plain <script> tag can POST the same form with fetch() and an Accept: application/json header to show an inline success message instead of redirecting. The HTML action and the fetch call hit the same endpoint, so you can start with the plain form above and upgrade later without renaming a field — see the API reference for the response shape.

  • Same https://splitforms.com/api/submit endpoint for HTML and fetch
  • JSON response returns success once splitforms accepts the submission
  • No field renames when you upgrade from a redirect to inline success
A static site form posting with fetch and receiving a JSON response from splitforms

Questions

Static site contact form questions.

Anything missing? Email us, we read every message.

A person reading answers to common questions
How do I add a contact form to a static site?

Add a normal HTML form that POSTs to https://splitforms.com/api/submit, with a hidden access_key field identifying which splitforms form receives it. No serverless function, PHP, or SMTP setup is needed — accepted submissions are saved to your dashboard before owner notification email is attempted; delivery time and inbox placement depend on provider and recipient settings.

Does this work on GitHub Pages?

Yes. GitHub Pages only serves static files and can't run a form handler, but it can still POST to an external endpoint. Point the form's action at splitforms and it works the same way on Jekyll, Hugo, Eleventy, or any other static host.

Do I need JavaScript?

No. A native HTML form submit works with zero JavaScript, and the botcheck honeypot field filters spam without any script running. Add a line of JavaScript only if you want the optional form_loaded_at time-trap field or a fetch-based inline success message — neither is required.

How do I prevent spam on a static contact form?

splitforms layers static-friendly defenses: a hidden botcheck honeypot field that must stay empty, server-side content heuristics on every submission, and rate limiting of 6 submissions a minute and 20 per 15 minutes per IP. Add the form_loaded_at time-trap field or optional reCAPTCHA v2 for extra coverage — none of it requires a JavaScript framework.

Can I submit with fetch and get a JSON response instead of a redirect?

Yes. POST a FormData body to https://splitforms.com/api/submit with an Accept: application/json header from a fetch() call, and splitforms returns a JSON response you can use to show an inline success message instead of redirecting the page.

Is there a free plan for a static site contact form?

Yes. Free covers 500 submissions a month across unlimited forms, with email notifications, spam filtering, and dashboard storage included — no credit card required. Pro ($5 per month) adds CSV/XML/PDF exports, webhooks, integrations, and auto-responder with a 5,000 submissions per month allowance. Check the pricing page for current limits.

Show 1 more questions
Can I customize the email subject or redirect visitors after submit?

Yes. Add hidden subject, redirect, and replyto fields to the form. subject sets the notification email's subject line, redirect sends visitors to your thank-you page after submit, and replyto sets the reply-to address so you can respond directly from your inbox.

View all FAQs

Start collecting leads from your static site.

Paste one HTML form, deploy, and every submission lands in your inbox and dashboard — 500 submissions a month free, no credit card required.

  • No credit card required
  • 500 free submissions
  • Setup in minutes
Two people celebrating a working contact form