Gatsby builds plain HTML files, so nothing is running that could receive a contact form. A form backend fills that gap: the form stays in your Gatsby templates and posts to an address the service gives you.
Full disclosure: we make FormTango, so it is on this list. All prices come from each service's own pricing page, as of November 22, 2026, and are linked.
What matters for Gatsby
- It must work with no server code, because a Gatsby site has none to run.
- A plain HTML form should work, with a JSON response available for submitting without leaving the page.
- Spam filtering that does not need a CAPTCHA wired up by hand.
- No lock-in: one address in the form, so you can switch service by changing a line.
Turning an HTML form into JSX for Gatsby
Gatsby pages are React components, so a form copied from an HTML page needs a few changes before it compiles:
- class becomes className, and for on a label becomes htmlFor.
- Every input needs a closing slash: input type="email" name="email" required /
- An inline style is an object: style={{ display: 'none' }}
- tabindex and autocomplete become tabIndex and autoComplete.
A Gatsby form works before React loads
Gatsby renders each page to HTML at build time. That means a form with a real action attribute and method="POST" is sent by the browser even if the JavaScript has not loaded yet or fails. It is the most robust setup and needs no handler.
If you want to stay on the page, add an onSubmit handler that sends the form with fetch and asks for JSON. After a successful answer you can show a message, or move to your own thank-you page with Gatsby's navigate function. The React guide has a handler you can reuse as it is.
Gatsby Functions as the do-it-yourself route
Gatsby has its own serverless functions: a file under src/api becomes an address your form could post to. They only run on a host that supports them. On plain static hosting, such as an S3 bucket or GitHub Pages, they do not run.
If your host does run them, a function can receive the form, and you then add the email service, its key, storage and spam filtering. For a contact form, a form backend is less to build and keeps the site deployable anywhere.
Environment variables in Gatsby
Gatsby only passes environment variables to browser code when their names start with GATSBY_, and the values are fixed at build time. A form address is not secret, so you can write it in the component or use a GATSBY_ variable. Do not put a mail service key in a GATSBY_ variable: it would be published with the site.
Prices at a glance
Prices and limits change often. Check each pricing page on the day you decide.
| Service | Free plan | First paid plan |
|---|---|---|
| FormTango | 1,000 submissions a month, unlimited forms | $9 a month for 10,000 submissions |
| Formspree | 50 submissions a month | $15 a month for 200 submissions; $30 for 2,000 |
| Web3Forms | 250 submissions a month, according to its own comparison page | See its pricing page |
| Forminit (formerly Getform) | 100 submissions a month, 1 form, 100 MB of uploads | $16 a month for 5,000 submissions and 10 forms |
| Splitforms | 500 submissions in total, once (it does not refill) | $5 a month for 5,000 submissions |
| Formspark | 250 submissions, once | $25 once for 50,000 submissions |
Our pick
FormTango: 1,000 free submissions a month (the most of any service here), unlimited forms, and messages past the limit are kept instead of rejected. If you want the longest-established name, pick Formspree; for the lowest paid price, Splitforms.
Connecting a form in Gatsby
The Gatsby guide has the steps and the full code. If you already have a form, the form checker finds the mistakes that stop it sending.
FormTango
A form backend with an inbox, spam filtering and email alerts. An AI coding tool can create a working form with one request and no account.
Good for: The largest monthly free plan in this comparison, sites built with AI coding tools, and anyone who wants over-limit submissions kept instead of dropped.
Watch for: New service (launched November 2026). File uploads, webhooks and CSV export are on paid plans.
Free: 1,000 submissions a month, unlimited forms. Paid: $9 a month for 10,000 submissions. Source
Formspree
The best-known form backend, with a large plugin library.
Good for: Teams that want the most established name and its integrations.
Watch for: The free plan has no file uploads, autoresponses or custom redirect. Webhooks and Zapier start on the $30 plan.
Free: 50 submissions a month. Paid: $15 a month for 200 submissions; $30 for 2,000. Source
Forminit (formerly Getform)
A form backend with workflows, validation rules and file uploads.
Good for: Forms that need file uploads on a free plan, or routing rules.
Watch for: One form on the free plan, and its pricing page says forms pause and reject submissions past the limit.
Free: 100 submissions a month, 1 form, 100 MB of uploads. Paid: $16 a month for 5,000 submissions and 10 forms. Source
How hard is it to switch?
Easy, as long as your form is plain HTML. A form backend is one address in the form's action attribute. Moving means creating a form at the new service, replacing that address, and sending one test submission.
Before you leave, export your old submissions if the service allows it. If the form uses a service-specific script or access key field, remove those at the same time.
Common questions
- Does a Gatsby site need a backend for a contact form?
- Yes. Gatsby has nothing running that could receive the form, so the form needs an address to send to. A form backend provides one.
- What is the best free form backend for Gatsby?
- For the largest monthly free allowance, FormTango (1,000 submissions a month, unlimited forms). Web3Forms and Formgong list 250. Checked November 2026.
Written by the FormTango team. Facts about other services were read from their own pages on November 22, 2026. Spotted something out of date? Tell us and we will fix it.