Spam protection

CAPTCHA

A CAPTCHA is a challenge that separates people from automated scripts, used to stop bots from submitting forms, creating accounts or scraping a site.

Also called: captcha test, bot challenge, human verification

CAPTCHA stands for “Completely Automated Public Turing test to tell Computers and Humans Apart”. The idea is to put something in front of a form that a person passes easily and a script struggles with.

The main kinds

  • Checkbox or image challenge. The visitor ticks “I’m not a robot” or picks the pictures that match a prompt. It is visible and sometimes annoying, but the result is clear.
  • Invisible, score-based. Nothing is shown. The provider watches how the visitor behaves on the page and returns a score for how likely they are to be a person. You decide the score that counts as good enough.
  • Non-interactive challenge. The browser solves a small check in the background and the visitor does nothing.

Verification happens on the server

A CAPTCHA widget in the browser proves nothing by itself. When the visitor passes, the provider hands the page a one-time token. The form sends that token along with its other fields, and the server asks the provider whether the token is valid. A form that only checks the widget in the browser can be bypassed by posting directly to the endpoint.

Trade-offs

Every CAPTCHA costs something. Visible challenges lower the number of people who finish the form and can be hard for people who use assistive technology. Third-party providers also load their own scripts and may process visitor data, which matters under GDPR. Many sites therefore start with a honeypot field and server-side checks, and add a CAPTCHA when spam gets through.

In StaticForm

StaticForm verifies the token on the server for five CAPTCHA options: reCAPTCHA v2, reCAPTCHA v3, reCAPTCHA Enterprise, Cloudflare Turnstile and hCaptcha. You enter the provider’s secret key in the form settings. When CAPTCHA is on, a submission without a valid token is rejected with a CAPTCHA error. The JavaScript helper loads the provider’s script and adds the token for you.

Learn more