Cloudflare Docs
Edit this page
Report an issue with this page
Log into the Cloudflare dashboard
Set theme to dark (⇧+D)

Migrate from hCaptcha

If you are using hCaptcha today, you can switch seamlessly to Cloudflare Turnstile by following the step-by-step guide below to assist with the upgrade process.

To complete the migration, you must obtain the sitekey and secret key.

​​ Client-side integration

  1. Update the client-side integration by inserting the Turnstile script snippet in your HTML’s <head> element:
Turnstile script snippet
<script src="" async defer></script>
  1. Locate the hcaptcha.render() calls and replace the sitekey with your Turnstile sitekey and the API.
// before
hcaptcha.render(element, {
sitekey: "00000000-0000-0000-0000-000000000000"
// after
turnstile.render(element, {
sitekey: "1x00000000000000000000AA"

​​ Server-side integration

  1. Update the server-side integration by replacing the siteverify URL. Replace:


  1. Replace the h-captcha-response input name with cf-turnstile-response.