Netlify Forms doesn’t just passively collect submissions; it actively guesses what’s spam before you even see it.

Let’s watch a form submission happen.

Imagine a user fills out your contact form on your Netlify-hosted site. They hit "Submit." Your frontend JavaScript, if you’re using Netlify’s built-in processing, sends a POST request to a special Netlify endpoint: /.netlify/forms/submit/<form-name>. Netlify receives this, and before it even thinks about saving it to your dashboard, it runs a quick check.

This check isn’t magic; it’s a combination of heuristics and, crucially, a hidden honeypot field. When you declare a form with data-netlify="true" and give it a name, Netlify automatically injects a hidden input field into the HTML. If a human user’s browser renders this field, it stays hidden. A bot, however, might just blindly scrape and submit all fields, including the hidden one. Netlify checks for the presence of this honeypot field in the submission. If it’s filled, it’s a strong indicator of a bot, and the submission is discarded.

Beyond the honeypot, Netlify also looks at patterns. It checks things like submission speed (unusually fast submissions are suspicious), IP address reputation, and if the submission contains common spam keywords or links. If any of these red flags are raised, the submission is flagged as spam and typically routed to a separate spam folder in your Netlify form submissions dashboard. You can then review these flagged submissions and manually mark them as legitimate if a false positive occurred.

Here’s how you set it up. In your HTML, you need a form element with data-netlify="true" and a name attribute.

<form name="contact" method="POST" data-netlify="true">
  <label>Your Name: <input type="text" name="name" /></label>
  <label>Your Email: <input type="email" name="email" /></label>
  <label>Message: <textarea name="message"></textarea></label>
  <button type="submit">Send</button>
</form>

Netlify automatically adds the honeypot. You don’t see it in your HTML source, but it’s there in the DOM when the page loads.

The real power comes from the fact that Netlify handles the spam filtering server-side. You don’t need to integrate third-party CAPTCHA services or write complex JavaScript validation for basic spam. Netlify does the heavy lifting for you, keeping your inbox cleaner by default. It’s a transparent process; you just declare your form and Netlify does the rest.

One detail many users miss is how Netlify differentiates between "Netlify Forms" and "Netlify Functions" for form handling. If you’re using a Netlify Function to process your form submissions (e.g., sending data to a CRM), you’ll need to explicitly tell Netlify Forms not to process it, and then handle the spam filtering yourself within your function, or rely on the fact that Netlify’s initial server-side check still happens before your function is invoked. The key is that data-netlify="true" triggers the built-in Netlify Forms processing, while a action="/.netlify/functions/your-function-name" attribute on the form bypasses this for custom server-side logic.

The next step you’ll likely want to explore is integrating your form submissions with external services like Zapier or a custom webhook.

Want structured learning?

Take the full Netlify course →