Add a contact form to any static site — no server needed

A static site is just files, so a host like GitHub Pages can serve a page but has nowhere to receive a form POST. Static Contact is the place the form posts to: it stores each submission, filters spam and emails you, and you write no server code.

The form posts to https://staticcontact.com/send/{access_token}. Sign up free to get yours.

Static hosts can't receive a form POST

  • GitHub Pages serves files only. There is no function to write; point the form at Static Contact.
  • Cloudflare Pages serves your build output. You don't need a function to write for a contact form.
  • Vercel serves your static build. There is no function to write for a contact form.
  • Render static sites have no function to write; the form posts straight to Static Contact.
  • Firebase Hosting needs no function to write for this either.
  • Netlify has its own form handling; see our Netlify Forms alternative guide.

Setup (about 5 minutes)

  1. Sign up (free, no credit card) and copy your Form's access code from the Forms page.
  2. Paste the HTML form from the example below into your page, replacing the access code in the action with your own. Keep the bot protection script inside the form.
  3. Optionally set a Return URL in your Form settings so visitors land on your own thank-you page after submitting. Without one they see our hosted thank-you page.
  4. Publish the page, submit a test message and check your inbox.

The form

Pick your generator

Step-by-step guides for individual static site generators are coming. The form above works in any of them, because it is plain HTML.

Frameworks that re-render the page

Next.js, Gatsby, Docusaurus, Nuxt, VitePress and SvelteKit can rebuild the page in the browser after it loads. Our protection script must sit inside the form on a full page load, so a form that a framework re-renders may lose it. Check that your published page still has the script inside the form. See the documentation.

Submit without leaving the page (optional)

Post the form with fetch and a FormData body, and ask for JSON back. A successful submission returns 200 with {"redirect_url": …}; a problem returns {"error": …} with a 401, 403 or 404.

Keep sending a FormData body from the browser rather than JSON. A JSON body needs "Allow API calls" switched on for the Form and skips the browser spam checks.

What to know

  • The Free plan includes 50 submissions a month for 1 form. See pricing for paid plans.
  • Spam never counts against your quota.
  • Submissions over your limit are held, not lost.
  • There are no file uploads.
  • JavaScript is required for the default bot protection.
  • Webhooks and chat notifications are on paid plans.

Testing your form

  • Verify both your account email and the form's email address, or notifications will not arrive.
  • While testing, add localhost to the Form's whitelist, or leave the whitelist empty.
  • Test submissions count toward your monthly quota.
  • Check your spam folder.
  • Visitor saw success but no email? The script tag is missing or outside the form.
© 2026 Static Contact. All rights reserved.