Spam protection
Cloudflare Turnstile
Cloudflare Turnstile is a CAPTCHA alternative from Cloudflare that checks visitors with a short background challenge, so most people never have to solve a puzzle.
Also called: Turnstile, Cloudflare CAPTCHA
Turnstile is Cloudflare’s answer to the usual CAPTCHA complaints: puzzles slow people down, and the older services collect a lot of data about them. Instead of a puzzle, Turnstile runs a short challenge in the background and, in most cases, the visitor sees a small widget that confirms them on its own.
Works without moving your site to Cloudflare
You do not have to host your site on Cloudflare to use it. You create a Turnstile widget in the Cloudflare dashboard, which gives you a site key for the page and a secret key for the server.
How the token travels
The widget renders inside your form. When the visitor is confirmed, Turnstile’s script adds a hidden input named cf-turnstile-response to the form. Your server then sends that token and the secret key to Cloudflare to find out whether it is valid. As with every CAPTCHA, only the server-side check counts.
When to pick it
Turnstile suits sites that want less friction than a checkbox reCAPTCHA and a provider other than Google. If you would rather have an interactive challenge, hCaptcha is the closest alternative. Either way, pair it with other layers rather than relying on it alone.
In StaticForm
Select Turnstile as the CAPTCHA type in the form settings and enter the secret key. Put the widget markup inside your form and the token reaches StaticForm in the cf-turnstile-response field, where it is verified before the submission is accepted. With the JavaScript helper, set captcha: { type: 'turnstile' } and the helper loads the script, picks up the token and resets the widget after each submit.
Learn more
Related terms
- CAPTCHAA CAPTCHA is a challenge that separates people from automated scripts, used to stop bots from submitting forms, creating accounts or scraping a site.
- reCAPTCHAreCAPTCHA is Google's CAPTCHA service. v2 shows a checkbox, v3 scores visitors invisibly from 0.0 to 1.0, and Enterprise is the Google Cloud version.
- hCaptchahCaptcha is a CAPTCHA service that presents a challenge to visitors and is positioned as a privacy-focused alternative to Google's reCAPTCHA.