the writing tool & vendor comparisons 10 min

Netlify Forms in 2026: Setup, Spam Filters and Limits

A practical Netlify Forms guide: how deploy-time detection works, setup for HTML, Astro and Next.js, spam filtering, notifications, limits and fixes.

Line-art browser window with a simple form and an arrow leading into an open envelope in a tray

Netlify Forms works by reading your built HTML at deploy time. Switch on form detection, add a netlify or data-netlify="true" attribute to a form tag, give the form a unique name, and redeploy. That is enough for a plain HTML site. Astro, Next.js and anything rendered by JavaScript need a static HTML copy of the form, because the build never sees the real one. Below: setup for each case, Akismet filtering plus honeypots and reCAPTCHA, notifications, what Netlify's own pages say about limits, a troubleshooting table, and when another backend is the better call.

How Netlify Forms works

There is no form endpoint to build. When a deploy finishes, Netlify's build system parses the HTML it is about to publish. Per the Netlify forms setup docs, that is why the page needs no API call and no extra JavaScript.

Three things have to be true:

  • Form detection is enabled for the site (in the Netlify UI, go to Forms and select Enable form detection). It applies from your next deploy.
  • The form tag carries data-netlify="true" or a bare netlify attribute.
  • The form has a name, and no other form on the site shares it.

During parsing, the build strips the data-netlify or netlify attribute and injects a hidden input called form-name, with a value matching your form's name. Submissions then appear in the Forms section of the Netlify UI. Anything Akismet passes goes into Verified submissions; anything it flags goes into Spam submissions.

One gotcha is worth knowing early: if you once disabled detection, re-enabling it, Forms, then Form detection, does nothing until you redeploy. The same docs note that disabling detection reduces post-processing and may speed up deploys, which is a fair reason to switch it off on a site that no longer has forms.

Setup for plain HTML, Astro and Next.js

Plain HTML

Here is the checklist I'd work through for a static site:

  1. In the Netlify UI, open Forms and select Enable form detection.
  2. Add data-netlify="true" or netlify to the form tag.
  3. Set a unique name on the form, and a distinct name on every input.
  4. Deploy. If detection was already on and you only added the form, a normal deploy is enough; if you just turned it on, redeploy.
  5. Send one realistic test entry and look under Verified submissions, then Spam submissions.

The docs' own example is a contact form with method="POST", name, email, a multi-select and a message. Nothing exotic, and nothing more than the pattern requires.

If you'd rather submit with fetch , the body must be URL-encoded. The docs build it with new URLSearchParams(formData).toString() and the application/x-www-form-urlencoded header. Netlify Forms does not support JSON form data at this time, so JSON.stringify is a dead end. For file uploads, the docs recommend leaving the Content-Type header off.

Astro

Netlify's Astro template puts the netlify attribute straight on the form tag and adds netlify-honeypot for spam blocking. That's the simple version, and a fair place to start.

But Netlify's Knowledge Base article (dated August 27, 2026) lists Astro alongside Next.js, Nuxt, SvelteKit and Gatsby as frameworks whose forms "aren't in the built HTML, so deploy-time parsing never sees them". Its fix is to keep a hidden copy of each form at public/__forms.html, with field names matching exactly. If your Astro form never appears in the UI, add that skeleton file and redeploy.

Next.js

This is where most people lose an afternoon. OpenNext's Netlify docs explain that modern Next.js pages are pre-rendered and cached rather than written out as static HTML files. netlify or data-netlify attributes in your React code therefore have no effect, and the form's target URL has to be a static file.

The workaround, consistently across Netlify's pages:

  • Put a static HTML file in public that defines the form and every field, names matching your React form.
  • Submit with AJAX to that static target instead of a full-page navigation (the troubleshooting tips say Next.js Runtime v5 needs form definitions in a dedicated static HTML file and AJAX submission).
  • Include the hidden form-name input in your React form.

OpenNext also mentions that the adapter's form check can be skipped by setting NETLIFY_NEXT_VERIFY_FORMS to false. For Next.js 13.5 and above, the setup docs point to the runtime's v5 breaking changes.

Any JavaScript-rendered form

Same idea everywhere. The build "won't find it in the pre-built files", so create a hidden HTML form with matching name attributes and add a hidden form-name input to the JS form. Want reCAPTCHA 2 as well? The hidden HTML also needs a div with data-netlify-recaptcha="true".

One honest wrinkle: the setup docs' AJAX example posts to /, while the Knowledge Base example posts to /__forms.html and says static sites may POST to / but SSR must target the skeleton file. If a post to / returns a 404 on an SSR site, try the skeleton path.

Spam: honeypots, reCAPTCHA and Akismet

Every submission goes through Akismet, per the spam filter docs. You get that without config. The extras are opt-in, and they behave differently.

Line-art sieve catching small bug-shaped bots while envelopes pass, next to a form with a dashed hidden field

Honeypot

Add netlify-honeypot="bot-field" (or any name) to the form tag, then include an input with that name and hide it with CSS or JavaScript. The build strips the attribute and leaves the input. If a bot fills it, Netlify quietly rejects the submission.

Two details bite. Hide it with CSS rather than treating type="hidden" as enough, because the idea is a field a bot sees and a human doesn't. With AJAX, the honeypot field name has to be in the POST body, which happens automatically if you encode with FormData(). The troubleshooting FAQ adds that a honeypot omitted from the submission, or filled, gets silently rejected. Hand-built request bodies that skip the field will vanish.

reCAPTCHA 2

Netlify can provide one: add data-netlify-recaptcha="true" to the form tag and to an empty div where the challenge should appear. Validation is server-side, and a failure redirects the visitor back to the same page and rejects the submission. You get one Netlify-provided challenge per page.

Need more than one, or want control? Use custom reCAPTCHA 2. Set SITE_RECAPTCHA_KEY (scope must include Builds and Runtime) and SITE_RECAPTCHA_SECRET (scope must include Runtime), and Netlify accepts only submissions with a valid g-recaptcha-response.

What lands where

Here is the part people miss. Submissions caught by a honeypot or reCAPTCHA 2 are rejected outright and never reach your Spam submissions list. If a real person reports a failed send, you can't dig it out of that tab. Akismet catches, by contrast, are kept for review.

Notifications and integrations

Notifications live under Forms, then Submission notifications. The setup docs describe two routes: send the submission content to an email address, or send it to an external service with an HTTP POST request.

The second route is the flexible one. Point it at a webhook and you can feed Slack, a CRM or your own endpoint. One third-party comparison from Static Forms lists the Netlify Forms integrations as email, webhooks and Slack, which matches that picture. It's a competitor's page, so read it as a summary, not a spec.

A small tip from the Knowledge Base: include an <input name="email"> and the notification email's Reply-to is set to the submitter. Hitting reply then goes to the visitor rather than to Netlify.

If your form takes uploads, remember the limits: one file per field, an 8 MB maximum form request size, and a 30-second timeout. If those files contain personal data, Netlify says you need extra security configuration and recommends its Very Good Security integration.

Limits and pricing

Short version: read Netlify's pages on the day you decide, because they currently don't say quite the same thing.

The pricing page lists Free at $0 forever with a 300 credit limit per month, Personal at $9 a month with 1,000 credits, and Pro at $20 a month with unlimited members, starting at 3,000 credits and going up to 20,000 in tiers. It describes included credits as covering production deploys, compute, form submissions, bandwidth and web requests. Its FAQ adds that accounts created before September 4, 2025 can keep their current plan.

The Forms usage and billing doc says that for credit-based plans, Forms are free and unlimited. One page lists form submissions among the things credits cover, while the other says Forms cost nothing on those plans. Third-party write-ups split too: a splitforms.com review says submissions cost no credits since April 14, 2026, while a Submit JSON comparison says they consume credits. I'd trust Netlify's billing doc over either, then confirm in your own dashboard.

On legacy plans the doc says Forms usage tracks Submissions (verified submissions per billing period) and File uploads (total storage), metered per site. At a level limit the site automatically moves up to the next level or package, and free tier accounts are metered with a limit too. The only figure I've seen for that limit, 100 submissions per site per month, comes from the splitforms.com review, not from Netlify's pages. Check before relying on it.

Neither the pricing page nor the billing doc carries a date, so open both when you read this.

Troubleshooting table

The fixes below come from Netlify's troubleshooting FAQ (dated October 3, 2026) and form troubleshooting tips (dated September 16, 2026), plus the setup docs.

SymptomCauseFix
Form never appears in the Netlify UIRendered client-side, or detection offAdd a static HTML copy with matching names; enable detection and redeploy
A new field is missing from submissionsField not in the static HTML versionAdd the field to the static form and redeploy
Nothing happens after turning detection onIt only applies to new deploysRedeploy the site
Test entries not in Verified submissionsAkismet flagged themCheck Spam submissions; use a real email, full sentences, and space out tests
Submissions vanish with a honeypotHoneypot field omitted or filledInclude the field in the POST body; use FormData()
AJAX post fails or is ignoredBody sent as JSONURL-encode the body
Next.js attributes do nothingPages are not static HTML filesStatic form file in public, submit via AJAX
Old data gone after renaming a fieldUI shows current fields onlyUse the API's listFormSubmissions endpoint; hide old fields instead of removing them

If the form silently does nothing, work down the first three rows in order. That's most cases.

When a different backend fits better

Netlify Forms is a good default when you're already on Netlify and need a contact form. It isn't always the right one.

Staying on WordPress

If your site is WordPress and the form already works, there's rarely a reason to move it. Contact Form 7, WPForms and similar plugins run on your own server, keep data in your own database and sit inside the editor your team already knows. If mail isn't arriving, that's a delivery problem you can fix where you are: see why Contact Form 7 stops sending email. Moving a form to Netlify only makes sense if the whole site is moving to a static build as well. That's a hosting decision, and Vercel versus Netlify is a reasonable place to weigh it.

Formspree and similar form backends

A hosted form backend makes sense if your site isn't deployed through Netlify's build. Netlify Forms depends on deploy-time detection, so it only works for sites deployed there. A form service gives you an endpoint that works from any host. Static Forms' comparison, for one, lists a free tier of 250 submissions every 30 days, its own figure, on its own page. Formspree works on the same principle, though I'm not quoting its limits here. Check its pricing page.

A serverless function

If you need to validate against a database, send a custom email or call another API, a function gives you full control and the cost is code you maintain. Netlify's Astro template points to form-triggered functions in its resources, which gets you a middle path: keep Netlify Forms for storage and spam, and run code per submission.

A CMS or builder form

If editors need to change fields without touching code, a form built into the CMS or page builder wins. Static HTML blueprint files are the opposite of editor-friendly.

FAQ

Can I use Netlify Forms on a site hosted somewhere else?

Not in the way you'd hope. Detection happens in Netlify's build, so the form has to be in a Netlify deploy. A third-party review says the same: forms work on sites deployed to Netlify.

Why do replies go to the wrong address?

Add an <input name="email"> to the form. The Knowledge Base says that sets the notification email's Reply-to to the submitter.

Should I turn off form detection if I remove my forms?

It's reasonable. Netlify says disabling it reduces post-processing and may speed up deploys. You confirm by entering the site name, and it takes effect from the next deploy.

Can I collect files that include personal data?

Netlify says forms with uploads containing PII need extra security configuration and recommends the Very Good Security integration. Remember the one-file-per-field and 8 MB request limits too.

The sharpest caveat: Netlify only sees forms that exist as static HTML at deploy time, so any framework-rendered form needs a static copy with matching field names. If you're weighing a move to a static stack and want a second opinion on the build, Jamstack development services covers that kind of work.

this post in the tree

Need this done, not just read?

Discuss your website Book 30 minutes